Home » Web Development » Page 3
copy a const char* into array of char (facing a bug)
24/4/2016 9:44 am by Mexico in Web Development

I have following method

static void setName(const char* str, char buf[16])
{
    int sz = MIN(strlen(str), 16);
    for (int i = 0; i < sz; i++) buf[i] = str[i];
    buf[sz] = 0;
}


int main()
{
   const char* string1 = "I am getting bug for this long string greater
than 16 lenght);
   char mbuf[16];
   setName(string,mybuf)
   // if I use buf in my code it is leading to sp

XML control layout in StackPanel
24/4/2016 9:44 am by slpnshot in Web Development

I have a lot of elements in my XAML code that i need to switch between visible and collapsed in my main code...

I have tried to create a parent of type StackPanel for all those elements. But now it messes up all the child element positions (it scatters them all over the place).

Is there any way to set that the parent does not control the position of the child and on


Cant fetch variable after submitting the form
24/4/2016 9:44 am by rancherlee in Web Development

The variable $role_id1 is not being fetched in $role_id in $_POST['add sub menu']. I want to store $role_id1 in $role_id and insert into database.Afer i click the submit button the role_id1 is fetching the parent menu but after i click add sub menu the role_id is storing 0 at backend.But i want it to store the vale of role_id1 which is being fetched after i click submit.Suggest any solution


Spark Streaming job get killed after running for about 1 hour
24/4/2016 9:44 am by brainhulk in Web Development

I have a spark streaming job that read tweets stream from gnip and write it to Kafak.

Spark and kafka are running on the same cluster.

My cluster consists of 5 nodes. Kafka-b01 ... Kafka-b05

Spark master is running on Kafak-b05.

Here is how we submit the spark job

nohup sh $SPZRK_HOME/bin/spark-submit --total-executor-cores 5 --class org.css.


Link external JS file with freemarker template
24/4/2016 9:44 am by DeadFred in Web Development

I want to link an external java script file with my freemarker template I used the normal <script type="text/javascript" src="test.js"/> but it didn't work , it works only when I use include which is not what I want . I want to use the js file as external one.


What's different from these two functions using send in python
24/4/2016 9:44 am by RoBo in Web Development

I am learning generator in python,here the functions:

import math
def is_primes(number):
    if number > 1:
        if number == 2:
            return True
        if number % 2 == 0:
            return False
        for current in range(3, int(math.sqrt(number) + 1), 2):
            if number % current == 0:
                return False
        return True
    return False


How to open permanent phones gallery through code on a folder
24/4/2016 9:44 am by Al Velella in Web Development

My app is creating a bunch of pictures and I want to open the folder with the user's gallery app so the user can watch, print, share them, or do whatever he likes.

The standard solution:

Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
Uri uri = Uri.parse(folder);
intent.setDataAndType(uri,"*/*");
startActivity(Intent.createChooser(intent, "Open fo

Repainting with values in LinkedStack not working
24/4/2016 9:44 am by tangsty in Web Development

I am making a game, and whenever I'm going to press the new game button, my canvas doesn't update, but my LinkedStack values have already been updated. It's supposedly have shuffled the LinkedStack values.

[EDIT]

-added a few parts in my code, and the main problem in my code is that whenever I press new game, the nodes show the correct new value, but whenever it is passed to p


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


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