Home » Web Development » Page 3
React state changing when pushing nested object
24/4/2016 9:44 am by rbrewer in Web Development

I'm trying to add/push a javascript object (let's call this 'session') to this.state.sessions.

I've tried this two ways: 1. Concat'ing the new session

this.setState({sessions: this.state.sessions.concat(session)});
  1. Using React's immutability helpers

    var newState = React.addons.update(this.state, { sessions : {


django - aggregate data according to field in model
24/4/2016 9:44 am by jbulow in Web Development


I have a model with a CharField with choices. I want to aggregate the model and get a list of all of the choices and the number of models in each choice. So if i have:

model1: a
model2: b
model3: c
model4: a
model5: c
model6: c

I want to build a django query set to get the following result (in json if i can)

{a: 2, b: 1, c: 3}

c++ msgsnd and msgrvc stuck in sleep
24/4/2016 9:44 am by IlLogiK in Web Development

I have small C++ program where main process is "creating data" and sends them to the child (fork) process which should read that data. My problem is that in school my code works well, but on my own laptop both processes get stuck right after the program start. Specifically both of them are in Waiting Channel "do_msgrcv".

Here is link to my code on pastebin (I'm posting whole code, so th


How to read a file from "open With" option of File Explorer?
24/4/2016 9:44 am by ponchopilate in Web Development

Most of the cases we use (as beginner) OpenFileDialog to open File explorer and we choose files...

But I want, if we right click on the file and choose "open with" option and choose the WPF app, then how it can be read?!!


Adding newline between elements in XSLT
24/4/2016 9:44 am by PliotronX in Web Development

I'm beggining in XML and XSLT and I have a problem with adding a new line beetwen elements

Here's XML:

<?xml version="1.0" encoding="UTF-8"?>
<numbers>
    <person id="1">
        <phone>
         <phone_nr>111111111</phone_nr>
         <phone_nr>222222222</phone_nr>
        </phone>
    </person>
    <person

Windows UAC Security With Exe
24/4/2016 9:44 am by Hugo Hernan Buitrago Rios in Web Development

I have an exe created with an old Borland C++ compiler. It needs administrator privileges to function correctly. Since the app will run at startup, I do not want the user prompted if it's OK to run the program (testing on Win7). My question is is there ANY way to remove that annoying prompt every time the app is run?

I added a manifest file with admin privs and signed it, but it then


how to costumize Dialog header in android studio?
24/4/2016 9:44 am by LDam in Web Development

so i'm using a costume dialog that ive created in a separate xml file in my project, and i'm coloring the main window a blueish tint, but the main header still remains the default white color,

there is no way to change the font color, size, background for the header ?

is the only thing i can change in the header is just the text ?

this is the dialog >


Restrict span text in to a single horizontal line
24/4/2016 9:44 am by Mahesh in Web Development

I've got a span which I need to keep as restrict to a single horizontal line which will not wrap inside it's parent div. The extra bit of text which goes beyond the length of its parent will be hidden.

<div id="parent">
   <span id="child">ABCD ABCD ABCD ABCD ABCD ABCD ABCD
ABCD</span>
</div>

#parent{
  width: 75px;
  white-space: nowrap;
  overflow: hid

Use more than one source to slide toggle an element
24/4/2016 9:44 am by diablo805 in Web Development

I've got a full screen slide down navigation menu with links which when clicked scroll to the relevant section . The menu is slide toggled by clicking on the #hamburger div . what i want is for the menu to slide out of view again when i click on a link but what happens is it slides up and then back down again

<div id="hamburger">
    <nav id="navigation">
        &

local variable is accessed from within inner class; needs to be declared final
24/4/2016 9:44 am by Fenix Drakken in Web Development

I am wanted to open a JFrame (HowTo), and close the current JFrame (Menu), on a button click. I get this error on the ActionListener. there error is: "local variable menuFrame is accessed from within inner class; needs to be declared final"

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class Menu {

public void menu() {

JFrame menuFrame = new JFrame(

Blending mode CSS3
24/4/2016 9:44 am by Vacant Space in Web Development

I am trying to implement something like this letter on an image with blending mode.

Here is my fiddle

<div id="box">
  <div id="image">
    <img src="https://www.epicurrence.com/images/speakers/julie.jpg"
/>
  </div&g
TAGS : Blending mode CSS3

Javascript writing HTML to page error
24/4/2016 9:44 am by Elieder in Web Development

I have read all SO posts on 'Uncaught SyntaxError: missing ) after argument list' and none of them solve this problem. I don't understand what is wrong.

I am returning JSON for a database and writing HTML for each result.

function addRow(str, count) {
str = str.substr(0, str.length -5);
document.getElementById("comments").innerHTML += '<br /><br
/><div  

JavaFX layout equivalents to Android ones?
24/4/2016 9:44 am by manivel in Web Development

In Android there are (magic) constants FILL_PARENT and WRAP_CONTENT (see ViewGroup.LayoutParams), that work pretty well to specify the size of stuff within a Layout.

(What) are the equivalents for JavaFX (especially in FXML speak)? I am mostly looking fo


Live ios(swift) chat, with existing rails web application
24/4/2016 9:44 am by overst33r in Web Development

I have an existing rails web application with a postgres DB running on the production server and I recently created an ios counter part. I am trying to implement a live chat message within the ios application (the web counter part does not have live chatting).

I have done some research and found that I need to create something called a TCPServer to have a constant communication between


stream sound comparasion in android
24/4/2016 9:44 am by Gogonez in Web Development

Im trying to create an App and I need stream sound comparison. something like these new camera apps that detects cheese and takes the picture. what am I trying to do , is that user records an audio (its ok) and runs the service, then whenever phone heard sound like that,It would do something.

I have already see stream sound comparasion android


Ajax call leads to page reload
24/4/2016 9:44 am by Oli in Web Development

I have the following AJAX call in a React method:

  handleActivitySubmit: function handleActivitySubmit(activity,
urlActivity, callbackMy) {
    console.log("making query with activity: " + JSON.stringify(activity));
    $.ajax({
      url: urlActivity,
      dataType: 'json',
      type: 'GET',
      data: activity,
      success: function (data) {
        callbackMy(Object.key

How to highlight menu button on scroll - AngularJs
24/4/2016 9:44 am by demetris in Web Development

this is a very common problem but I can't figure it out. I have a web site in which all sections are all on the same page and you may view them by scrolling. I would like that when I'm in the section "About", the About-button on the menu be highlighted. I know how to do it onclick but not on scrolling.

This is my code:

index.html:

<nav id="na

MacOS 10.11 - Getting python-dev error when trying to install CMU PocketSphinx
24/4/2016 9:44 am by Leo in Web Development

Whenever I try to install CMU PocketSphinx I get the error :

checking for Python include path...
-I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
checking for Python library path...
-L/Library/Frameworks/Python.framework/Versions/2.7/lib -lpython2.7
checking for Python site-packages path...
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site

$(document).ready equivalent without jQuery
24/4/2016 7:43 am by n3. in Web Development

I have a script that uses $(document).ready, but it doesn't use anything else from jQuery. I'd like to lighten it up by removing the jQuery dependency.

How can I implement my own $(document).ready functionality without using jQuery? I know that using window.onload will not be the same, as window.onload fires after all images, frames,



Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .