[Solved] This cpp code is for loading images using ls command.But it is not loading any image, even though it doesn’t show any error.plz help me to fix this [closed]

There are two major problems with your code. The first is that while (!feof(…)) will not work as you expect it to. That is because the EOF flag is not set until after you try to read beyond the end of the file for the first time. Instead do e.g. while (fgets(…) != NULL). The … Read more

[Solved] php pdo $_post insert

$fields = array_keys($_POST); if (!empty($fields)) { $names = implode(‘`, `’, $fields); $values = implode(‘, :’, $fields); $sql = “INSERT INTO customers ( `”.$names.”` ) VALUES ( :”.$values.” )”; print_r($sql); $addRandom = $pdo->prepare($sql); foreach ($fields as $field) { $addRandom->bindValue(“:{$field}”, $_POST[$field]); } $boolean = $addRandom->execute(); if ($boolean){ echo ‘INSERTED’; } else { echo ‘FAILED’; } } 0 … Read more

[Solved] Unity game too dark in android device?

You provided close to no information about the problem but… Try setting your lights to Render Mode: Important in Inspector, also check your Quality Settings for pixel light count and make the default value higher. If you want more accurate answers that will help you resolve your problems faster – try adding some pictures of … Read more

[Solved] how can i create successfull popup window after register in php [closed]

nice question! They way you could do something like that would be.. to try and check what is your url – in this case is: header(“Location: ../Home.php?signup=success”); … and basically see if it contains the keyword “signup=success”. To do this, you need $url=”http://” . $_SERVER[‘SERVER_NAME’] . $_SERVER[‘REQUEST_URI’]; if (strpos($url,’signup=success’) !== false) { echo ‘Thank you … Read more

[Solved] What is !+[]+!+[] in javascript? [closed]

Breaking down the expression into the correct order of operations, you have: (!(+[])) + (!(+[])) First things first, [] is cast to a number by +, which results in 0. Don’t ask me why, it just does :p Probably buried in the specification somewhere. !0 is simply true So you end up with true + … Read more

[Solved] python string parse with @ and space [closed]

It is not very hard to write an expression for this. >>> import re >>> re.findall(r’@(\S+)’, ‘ I want to tell @susan and @rick that I love you all’) [‘susan’, ‘rick’] Or use \w which matches any word character. >>> re.findall(r’@(\w+)’, ‘ I want to tell @susan and @rick that I love you all’) [‘susan’, … Read more

[Solved] Why do I get output “5”?

This program is invalid (further explanation of why follows below). In C89 when you call m(), or in C99 when you start the program at all, undefined behaviour is caused. This means anything can happen. To put it another way, the compiler only has to cope with correct programs; and if you make a mistake … Read more

[Solved] How to check if the mouse did not move for 2 minutes in WPF?

Add a timer control to your application. Subscribe to mouseover and keydown events – when they fire, reset the timer. When the timer fires (ie mouse hasn’t moved and key’s haven’t been pressed for x amount of time), lock the screen / prompt for login. This could also help: http://www.codeproject.com/Articles/13756/Detecting-Application-Idleness solved How to check if … Read more

[Solved] How to reduce memory leak in java?

lets analyze a few of the the possible error messages: java.lang.OutOfMemoryError: Java heap space java.lang.OutOfMemoryError: PermGen space java.lang.OutOfMemoryError: Requested array size exceeds VM limit java.lang.OutOfMemoryError: request <size> bytes for <reason>. Out of swap space? java.lang.OutOfMemoryError: <reason> <stack trace> (Native method) Here’s the MemLeak class: package com.post.memory.leak; import java.util.Map; public class MemLeak { public final String … Read more