Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Browsing all 139863 articles
Browse latest View live
↧

Generalising typescript functions into one

i have a setup that looks like this:import { theme } from '../Theme' import { select } from '@storybook/addon-knobs' // Utility that returns object properties as a typed array seeing as Object.keys...

View Article


retrieving a value from dropdownlist and making the next field in the column...

I need to get addicted, one field from another.If the ' dzwol ' option is selected in the dropdownbox, I would like the value '-1' to be displayed in the second columnWhat I was able to do is at the...

View Article


React hooks: dispatch action from useEffect

My folder structure:|--App |--Components |--PageA.js |--PageB.js |--PageC.js |--common-effects |--useFetching.js I am refactoring my code to fetch data from API, using react hooks. I want to dispatch...

View Article

How can i merge two arrays in one array of arrays in Javascript? [duplicate]

I have the following two arrays:const firstArr = [1, 2, 3, 4] const secondArr = ['somevalue', 'anothervalue', 'another', 'other'] I would like to get the following output:const final = [[1,...

View Article

re-render component after post request api react

After a post request, the data gets inside the database but it is not re rendering the component. I need to manually press the F5 button and the new data will be displayed. It seems like the then is...

View Article


How to iterate over multiple arrays - Jquery

I have two arrays in my code as below names = ['Kelvin', 'James']; age = ['9','10']; When iterate over the arrays, i append the data to a table. This is what i want to have my table look like after i...

View Article

Node.js CPU Load balancing Websocket Client over Multiple CPU Cores

My node.js app currently subscribes to a number of websocket servers that is starting to push a lot of data over to the app every second. This websocket client app has several event handlers that does...

View Article

How do I make a min file in the same path or dest on gulp-rename and...

Hi everyone I hope you having a great day, I'm trying to find a way on how do I make a min file in the same path or gulp.dest() on gulp(gulp-uglify and gulp-rename). In my code below when I run my gulp...

View Article


Initializing an array of class with certain number of elements in Angular

I am looking for a way to initialize an array of type Passenger which its number of elements is equal to the value of variable count. How can I do it in ngOnInit()???This is the Passenger model:export...

View Article


Why is it possible to reassign `const x` in the console after an await?

By first defining an async function,async function a() { return new Promise(resolve => { resolve('hello') }) } Then assigning x to 'hello',const x = await a() Then reassigning x.x = 'something...

View Article

Why am i getting a "function not defined" error when there are 2 functions in...

The script tag part in "head" : ''' function reload() { //some code } function bookconfirm(clickinfo) { //some code } The part that are calling them: <select name="city" onchange="reload()">...

View Article

Reading in view return values ​from the controller AJAX / ASP.NET UPDATE

called by selectbox go into function 'getDepAndMan()', there is a value taken from the selectbox (works)calls functions in the controller 'GetDepartmentAndManager' (works)controller returns value...

View Article

How to fire javascript function when div is loaded (but do not wait, while...

I'm using menus, tabstrips, etc. on my HTML page, which needs to be initilized in JavaScript, for example:<ul class="k-menu"> ...some menu items </ul> <script...

View Article


Cannot read property 'value' of undefined at HTMLTableElement. Update

I have c # code in asp.net view: (It create time inputs for me with the class described)View:<td id="td01">@Html.TextBoxFor(m => m.Model1[nr_rows].Rozpoczecie, new { @class = "start", @type =...

View Article

Best way to handle diferent keys in multiple apis responses

I'am trying to develop a nodejs service that will work as a proxy between my apis and third party apis. What I need to implement is a system capable of receiving multiple api responses and "translate"...

View Article


Clickable links in Page Flip demo

I followed the tutorial on http://www.html5rocks.com/en/tutorials/casestudies/20things_pageflip.html and got everything working except I can't seem to figure out how to mouseclick anything like an...

View Article

How to download a large number of web pages to test?

We need to download a large number of web page for malicious code detection. May I ask what is your recommended method to do it? Is there any tools or do you have any repository that can help us? We...

View Article


Which eslint rule for infix spacing for class member?

I am using TypeScript with eslint.eslint can format the following snippetvar a=2 tovar a = 2 But it does not work if variable a is a class member like this:class Hello { a=2 } How can I config eslint...

View Article

How to work with Async/Await in expressjs router?

I've been battling with an issue concerning Async/Await, I'm relatively new to Nodejs. I have a repository where I connect directly to my mongodb collection to retrieve some data it but when I connect...

View Article

How to install React Js with CodeIgniter..?

Possible duplicates:Codeigniter and React.JS setupReact.JS setup with Codeigniterhow to implement react js in codeigniterReactJS not rendering php codeigniterAbove given links are not working...

View Article
Browsing all 139863 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>