Home » Web Development » Page 4
Rails - why I'm getting undefined method `name' for nil:NilClass
Web Development

I'm displaying question by categories and each question has its own number. I made it like this(index.html.erb):

<% @categories.each do |category| %>
     <div id=<%= "box#{category.id}" -%>>
        <h1><%= category.name %></h1>
        <% category.questions.each_with_index do |question, i| %>
            <ul class="question-list" s

Tell me how to send the Json request
Web Development

I am sending the json request code give the error Is there any way how to send the json request with authentication.this Code give the Error in filenotfound "http://api.seatseller.travel/blockTicket"
//st = json object

       StringBuilder sb = new StringBuilder();  

Web API Controller POST Request LINQ search through String Array
Web Development

I have the following database structure.


Sorry for the horrible MS Paint Work

I am using .NET Framework 4.6.1 Web API Controller using Entity Framework.

My API Controller handles a post request that receives a structure similar to:

copy a const char* into array of char (facing a bug)
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];
   // if I use buf in my code it is leading to sp

XML control layout in StackPanel
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
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
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
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
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
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);
startActivity(Intent.createChooser(intent, "Open fo

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