Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 13 17:43
    @rostrander_gitlab banned @habibatify_twitter
  • May 06 21:25
    @MadLittleMods banned @amanmahendra00_gitlab
  • Apr 30 15:20
    @MadLittleMods banned @Baranov1D_twitter
  • Apr 27 05:45
    @MadLittleMods banned @zhonghuacx
  • Feb 19 00:49
    @MadLittleMods banned @Whats-In-My-Vape_gitlab
  • Oct 13 2018 17:05
    @InternetUnexplorer banned @akhilreddy4245
  • Aug 20 2018 13:56
    @InternetUnexplorer banned @JMP2DIS
  • Jun 26 2018 09:23
    @MadLittleMods banned @chinedu69931716_twitter
  • Jun 16 2018 16:41
    @InternetUnexplorer banned @mewovi21_twitter
  • Jun 08 2018 02:57
    @MadLittleMods banned @VPB_COM_twitter
  • Jun 05 2018 23:12
    @MadLittleMods banned @LWSS
  • Jun 04 2018 17:35
    @MadLittleMods banned @Dreamboy6668_twitter
  • Jun 04 2018 17:34
    @MadLittleMods banned @javaaltu1_twitter
  • Jun 04 2018 17:33
    @MadLittleMods banned @alam110
  • Jun 04 2018 17:33
    @MadLittleMods banned @MixedVideo_twitter
  • Jun 04 2018 17:32
    @MadLittleMods banned @Hakmabhai1_twitter
  • Jun 04 2018 17:32
    @MadLittleMods banned @raza_shahjad_twitter
  • Jun 04 2018 17:32
    @MadLittleMods banned @simarjeetsohna_twitter
  • Jun 04 2018 17:32
    @MadLittleMods banned @malikbila5_twitter
  • Jun 04 2018 17:32
    @MadLittleMods banned @AmitMoarya967_twitter
Josebuendia
@Josebuendia
@jgonggrijp
Julian Gonggrijp
@jgonggrijp
@Josebuendia Did you notice that jsFiddle has three boxes? One for HTML, one for CSS and one for JS? You need to paste your HTML and your CSS in two separate boxes of the same fiddle.
There's something wrong with the grid. The column, rows and fractals won't change.
when the values are changed .
Josebuendia
@Josebuendia
Won't change when the program is launched in a browser.
Roger Ostrander
@rostrander_gitlab
@Josebuendia To answer your earlier question about why the text is so huge, you set your cell-1 class to have font-size: 3rem;. I discovered this via Firefox developer tools: You can right-click any element on the screen and choose 'Inspect Element' to get a breakdown of the CSS affecting it. (Chrome has something similar)
Josebuendia
@Josebuendia
Yeah, I fixed that by changing it to this: .cell {
color: white;
font-size: 1rem;
text-align: center;
padding: 4rem;
}
/Header/
.cell-1 {
grid-row: 1/4;
grid-column: 2/4;
background: orange;
font-size: 3rem;
}
But what about the other problem?
Roger Ostrander
@rostrander_gitlab
Unfortunately, spotting the text issue is about all the CSS experience I have, so I can't really help you with the grid stuff.
nayeembadhusha
@nayeembadhusha
Hi guys
anyone using JS docs ??
need some info
Roger Ostrander
@rostrander_gitlab
@nayeembadhusha Go ahead and ask, if anyone knows and is willing to answer, they will.
dimtabu
@taburetkin

Guys, i need help
I received a couple feedbacks from my clients about some strnage bug present in some of my web applications.
Sometimes the user just can't focus some input fields. User clicks to focus the input field but nothing happens.
That was pretty hard to find out what there really happens, but today i finally found what was that.
If you show print preview in separate chrome tab and close that preview tab NOT by cancel button but with tab close button then you cant focus anything in a document initiated that print preview.

the codepen: https://codepen.io/dimatabu/pen/YzKpZGV?editors=1010
but this codepen should be tested in chrome in debug mode
here is the link: https://s.codepen.io/dimatabu/debug/YzKpZGV/bZMQWELzJQYA

Can anyone tell me what there happens and how to avoid this behavior?
Is it a bug, or i just do it wrong?

04raghuramvugs
@04raghuramvugs
How can I handle browser tab close event in Angular? Only close, not refresh.
I am not able to identify when page is refreshed and when tab or browser is closed.
Because in both cases it fires "window:unload" and window:beforeunload" event so it's hard to identify.
dimtabu
@taburetkin
@04raghuramvugs what do you want to do at the tab close?
ns26
@ns26
Looking for a Javascript senior.. I've been working on this code and staring it down for hours, maybe someone can spot the problem way faster than me? It's a big code so please PM me.
nayeembadhusha
@nayeembadhusha
is there any search feature available in jsdocs?
nayeembadhusha
@nayeembadhusha
and why does esdocs require keyword export for generating documentation
Julian Gonggrijp
@jgonggrijp

@taburetkin :point_up: August 21, 2019 11:11 AM

[...]
If you show print preview in separate chrome tab and close that preview tab NOT by cancel button but with tab close button then you cant focus anything in a document initiated that print preview.

the codepen: https://codepen.io/dimatabu/pen/YzKpZGV?editors=1010
but this codepen should be tested in chrome in debug mode
here is the link: https://s.codepen.io/dimatabu/debug/YzKpZGV/bZMQWELzJQYA

Can anyone tell me what there happens and how to avoid this behavior?
Is it a bug, or i just do it wrong?

I haven't tried it, but your description sounds very much like a bug in Chrome. I'd be surprised if there is anything you can do about it as a web dev, other than reporting a bug to Google.

Workaround: don't take the steps you described.

@ns26 :point_up: August 21, 2019 3:13 PM

Looking for a Javascript senior.. I've been working on this code and staring it down for hours, maybe someone can spot the problem way faster than me? It's a big code so please PM me.

I'm not going to debug your code for you, but if you summarize what your code is doing (client or server, what task is it meant to do) and what is going wrong (error messages, things that should happen but don't or the other way round), I might be able to give you some tips on how to hunt down the bug yourself.

Jacob Hallgarth
@spatrick195
@taburetkin
focusMethod = function getFocus() {
document.getElementById("myTextField").focus();
}
Maybe just focus the text on button click
dimtabu
@taburetkin
@spatrick195 nope, i tried
dimtabu
@taburetkin
@jgonggrijp Yes, that is exactly what i did. i reported a bug and replaced the logic in my apps to reduce possibility of this but its not 100% safe.
But there is always a chance that i can be wrong and there is a simple solution or workaround exist:)
ShriramThangapandian
@ShriramThangapandian
Hi, I have doubt on angular. I bundled the script files in my project... It worked. But the ng-cloak stopped working in cshtml files. I cannot find a solution... Could someone help please....
Janusz Kotlet
@KotletJanusz_twitter
woocommerce/woocommerce#24349 i've got this problem
any ideas?
Roger Ostrander
@rostrander_gitlab
@KotletJanusz_twitter Honestly, it sounds like a bug, in which case you've already created the issue for it. Unless you're interested in diving into the woocommerce code to fix it, that's likely all you can do.
AminulKazi
@AminulKazi

Hi guys, I hope you are all well. I have this problem and was hoping one of you could help.

Imagine this is the data-set you are given as an array. 12, 12, 12, 12, 12, 17, 17, 17, 17,12, 12, 12, 12, 12, 17, 17, 17, 17,17, 17, 17, 12, 12, 12, 12, 12

As you can see there are two sets with the number 17, what algorithm can I use to sum the first set of 17s and another sum for the second set of 17s.

So i want two variables that hold the sums of the two sets of 17s which are separated by one set of 12s, what algorithm would achieve that?

So the expected outcome would be like this:

1st sum = 68 (because we 4x17 first time)

2nd sum = 119 (because we 7x17 second time)

Ashish Gupta
@gotoashishgupta
How does continuous delivery work with DAST?
Julian Gonggrijp
@jgonggrijp
@AminulKazi :point_up: August 24, 2019 12:45 AM
What have you already tried and how far did you get?
Roger Ostrander
@rostrander_gitlab
@taburetkin Please don't just give out homework answers. Besides, your code is going to be pretty confusing to someone who's trying to learn :)
dimtabu
@taburetkin
well
dimtabu
@taburetkin
i disagree on that. in my opinion my answer was useless to whom who do not want to learn and pretty interesting to anyone who wants to learn.
your reaction was so fast, like a shoot, so i am not sure that you even really "saw" my answer. :)
no offense
ns26
@ns26
Hey guys. How would you write this? :P
  // UPDATE IDLISTS FROM CHROME.STORAGE
  chrome.storage.sync.get(["idList1","idList2","idList3","idList4","idList5","idList6","idList7","idList8","idList9","idList10"], function(data) {
    var sid1 = (data.idList1);
    var sid2 = (data.idList2);
    var sid3 = (data.idList3);
    var sid4 = (data.idList4);
    var sid5 = (data.idList5);
    var sid6 = (data.idList6);
    var sid7 = (data.idList7);
    var sid8 = (data.idList8);
    var sid9 = (data.idList9);
    var sid10 = (data.idList10);
    document.getElementById("idList1").value = sid1;
    document.getElementById("idList2").value = sid2;
    document.getElementById("idList3").value = sid3;
    document.getElementById("idList4").value = sid4;
    document.getElementById("idList5").value = sid5;
    document.getElementById("idList6").value = sid6;
    document.getElementById("idList7").value = sid7;
    document.getElementById("idList8").value = sid8;
    document.getElementById("idList9").value = sid9;
    document.getElementById("idList10").value = sid10;
  });
dimtabu
@taburetkin
let ids = ["idList1","idList2","idList3","idList4","idList5","idList6","idList7","idList8","idList9","idList10"];
chrome.storage.sync.get(ids, data => {
  ids.forEach(id => document.getElementById(id).value = data[id]);
});
Joshua Whalen
@CloudBranch
I just put my Node.js authentication boilerplate on Github. Check it out.
Feel free to submit a pull request.
Srinath
@Srinath-V-S

How can I create a website using c++?. I've been given a task by a company. I never created an application using c++. I just want a headstart on how to go about this task. Can anyone help me? Here is the task.

For the first level of the process, your goal is to build a web-app about Super Heroes. You would need to build a backend server to fetch/manipulate the data and a frontend web app to consume the APIs from the backend and present them to the user.

The back-end should have the following features compulsorily
Should be in written in C++
Should use the Ninja Build system. (https://ninja-build.org/)
Should use the date from https://superheroapi.com.
Should be able to communicate with the frontend via HTTP APIs.

The Frondend should have features like
Dashboard with some stats
Search for SuperHero

What sort of task do I need to do in backend with C++?. They never mentioned anything related to the database. So the data will be available via that API.So do I need to call and fetch data from that API through C++? I'm confused please help!.

Roger Ostrander
@rostrander_gitlab

@Srinath-V-S I don't know much about C++ backend software (it's not very common as a backend) so this is more general advice: Break down the task into small bits. For instance:

First, make a 'hello world' program with the ninja build system (unless you're already familiar with Ninja Build). Getting that out of the way early will help.

Second, make the simplest C++ web service you can; a quick search shows me some C++ backend frameworks such as https://github.com/azadkuh/qhttp and https://www.webtoolkit.eu/wt - though if you really wanted to you could just open up a socket on port 80 and listen to requests (probably overkill). If you do use a framework, you'll need to find a way to get it incorporated with Ninja Build since they seem to want you to use that.

Third, make the other part that hits the superhero API. Again, I don't know specific libraries for C++ that let you make web requests, but there are probably a lot so that part shouldn't be too bad. Do enough that you can fetch whatever dashboard info you want. Writing a general 'search' function will be helpful.

Fourth, make the frontend. This can just be a static HTML page that requests pages from the backend that your C++ generates, or it can be something like a JS framework, whatever you're comfortable with.

You can do those in any order, too, that's just what I thought up. It might be more helpful to do the frontend first, for instance.

That's about as specific as this channel's likely to get, since this sounds like an interview question :)

Julian Gonggrijp
@jgonggrijp
@Srinath-V-S @rostrander_gitlab POCO is a big internet library for C++ which has lots of bells and whistles. Besides POCO, I know that Boost.Asio can also do HTTP requests and Qt has networking facilities as well.
Srinath
@Srinath-V-S
Thanks! I'm going to check on POCO Framework @jgonggrijp
@rostrander_gitlab Thanks for the detailed explanation I'll try to do the four steps. BTW The WT binary package was removed from recent versions of Ubuntu because the Debian (and Ubuntu) maintainer stopped maintaining it. So I'm gonna go with POCO.