All Questions
0
votes
0answers
2 views
run a set of system commands from r
I have to run the following system command (command line) from R console.
:Loop
Rscript D:/check.r 2 3 | find "Warning"
if not %errorlevel% equ 0 goto :Loop
echo Connection established
I know there ...
0
votes
0answers
2 views
Why does this program print 24 times? (using fork)
Could you please explain why this program prints 'k' 24 times? I thought it would be 14 as I present you my drawing:
tree
The code looks this simple:
#include <stdio.h>
int main()
{ int ...
0
votes
0answers
3 views
Text adventure game guidance - Should every class in Java have a public static main method or not?
Currently in the process of creating an OOP version of a text adventure game for my students. I have the following classes:
Room
Character (which extends to sub classes - Boss, Player and NPC)
Item
...
0
votes
0answers
7 views
Sscanf into pointer, with return
So I have a pointer (b), and I want to read numbers into that pointer, I can't fix it :\
double* bekerdezo2(double* b)
{
printf("DEBUG:Bekerdezo ketto");
while ((fgets(line, sizeof line, ...
0
votes
0answers
3 views
Undirected Graph: Minimum Spanning Tree with few red edges as possible
I am not sure how to proceed with this problem.
Given an undirected graph, with each edge having color either red or blue. How can I find the minimum spanning tree which contains few red edges as ...
0
votes
0answers
3 views
How to iteratively count in Pandas Dataframe
I want to count all times a value occurred up to the present position in pandas/python. A condition must be accounted for (numbers must be present in 'score' column to count a game as played; shows up ...
0
votes
0answers
2 views
Sort ArrayCollection with OrderBy Annotation issue
I'm trying to sort an ArrayCollection in a specific order from the retrieved entity but the @ORM\OrderBy won't fire.
Showcase.php:
/*...*/
use Doctrine\ORM\Mapping as ORM;
use ...
0
votes
0answers
5 views
How to retrieve the right URL of a file uploaded (with spring MVC) on the server (Tomcat)
I have a form that allow user to upload an image (jpg), in order to show that image in another page.
This is the method I used:
public void salvaFoto(...) throws FotoUtilException{
...
0
votes
0answers
13 views
Big difference (x9) in the execution time between almost identical code in C and C++
I was trying to solve this exercise from www.spoj.com : FCTRL - Factorial
You don't really have to read it, just do it if you are curious :)
First I implemented it in C++ (here is my solution):
...
0
votes
0answers
2 views
Dynamic Mod_Rewrite Issue
I'm designing a completely database driven site, and honestly are VERY new to mod_rewrite. I've looked for an answer to my question without success.
Here is what i've come up with so far:
Options ...
0
votes
0answers
2 views
css hollow circle with text inside
How can I make effect like this
I mean a text (text is simple, 1/10, 2/10, 3/10 etc) inside and circle around it, and i want to change percent of blue on this circle (dynamically). I thought about ...
0
votes
0answers
3 views
Moving a element sequence value to other element sequence
I have a certain requirement where, I need to move the sequence element values to another newly created element according to the the number of values in the original sequence.
Please find my Input XML ...
0
votes
0answers
6 views
Form validation echo variable not working
I have been having issues getting my error to echo the variable next to the form field. The PHP is working fine because with the following code:
$NameErr = '';
if (empty($_POST["name"])) {
echo ...
0
votes
0answers
2 views
Particular Nim game variant (2 or 3 sticks)
You start with a stack of n sticks. Each player removes 2 or 3 sticks each turn. The player who removes the last stick wins. If their is only one stick left, the game is a draw.
I need to determine ...
0
votes
0answers
5 views
C code in Eclipse return undefined reference to symbol cvSaveImage
I'm using Eclipse and OpenCV (Version 3) on Ubuntu 15.10 to write a C program but I don't get why I'm always getting the error
undefined reference to symbol 'cvSaveImage'
If I run
pkg-config ...
0
votes
0answers
8 views
Ensuring that a variadic template contains no duplicates
I guess my whole problem is well described in the title. I am trying to create a variadic class template (in C++11, C++14 or C++1z).
template<typename ...Types> struct MyVariadicTemplate {};
...
0
votes
0answers
3 views
Meteor: Access reactive dict variable in child template
I need to check in a child template the value of a reactive dict variable, which was created in the parent template.
<template name="parent">
{{ > child }}
</template>
...
1
vote
0answers
4 views
How not to use custom comparison function of std::map in searching ( map::find)?
As you can see in my code, lenMap is a std::map with a custom comparison function. This function just check the string's length.
Now when I want to search for some key ( using map::find), the map ...
0
votes
0answers
2 views
plot dataframe kind= line with axis labels
I already asked about labeling the axes and I have got the answer that satisfied me for the data that I had at that time. But now I'm trying plot the dataframe with kind=line to see better the ...
0
votes
0answers
5 views
Need Help Regarding JAVASCRIPT and CSS3
Guys I got Assignment in Class for making calculator in JAVASCRIPT and Sir told us to Do CSS Designing in JS not out of JS so we Should use HTML5 and inline CSS in JS, I have cofusion in something,
I ...
0
votes
0answers
3 views
Connection to sqlite database
I tried to connect to sqlite database with java using eclipse , I added all the .jar file , but I always get an exception message says java.lang.ClassNotFound:org.sqlite.jdbc
here the code of the ...
-1
votes
0answers
10 views
The ? : operator [duplicate]
I have this if else statement
if (Integer.valueOf(r.getString(4)) == 1) {
jRadioButton1.setSelected(true);
} else {
jRadioButton2.setSelected(true);
}
I want this in ?: format
...
0
votes
0answers
8 views
I have python function for pascal's triangle, need to turn it into Java
So here's my code below. It takes an argument n and creates n number of rows of pascal's triangle and saves it into a list of lists. I've attempted to turn this into java but array's in java are too ...
0
votes
0answers
3 views
Twitter API returned a 401 (Unauthorized), Invalid or expired token
I am using the below code to post a Tweet. This is a pretty standard authentication procedure but for some reason I cannot authenticate. The error I am getting is Twitter API returned a 401 ...
0
votes
0answers
7 views
How to pass a value into a directive?
I'm using a directive to insert a youtube player in my templates,
app.directive('youtube', function($window, youTubeApiService) {
return {
restrict: "E",
scope: {
videoid: "@"
},
...
0
votes
0answers
3 views
Removing a subset of polygons from an array of polygons
I plot polygons on a google map in groups. Each group has a unique color, passed into the html/JavaScript.
called from from Delphi
function MarkArea(Lat, Lng, otherColor) {
var latLng = new ...
0
votes
0answers
2 views
WordPress pagination returns extra blank page
I've tried every way to display posts but for some reason on my search results page WordPress always returns an extra blank in my results. Any help would be greatly appreciated.
My code:
<div ...
0
votes
0answers
6 views
NullPointerException when loading image [duplicate]
I'm having a hard time loading an image from a file.
Here is my code
//Copies the image selected in a JFilePicker to the user directory
Path origem = ...
0
votes
0answers
3 views
upload image with parameters, using angular-file-upload, carrierwave
plz help me with this:
i'm using this directive angular-file-upload to upload single image with parameters:
uploader = $scope.uploader = new FileUploader(
url: '/recipes',
alias: ...
0
votes
0answers
6 views
Bare-metal TCP/IP stack for embedded communication on Qorivva Power Architecture
I would like to implement the functionality provided by a TCP / IP stack for an Ethernet embedded communication between a plantform with a 32-bit processor Power Architecture Qorivva - MPC5748G ...
0
votes
2answers
10 views
C program gives ambiguous output
This is my C program :
#include <stdio.h>
main(){ printf("%f", 5/3); }
I expect an output of 1.000000, but what I get as an output is 0.000000. Can someone figure out why?
0
votes
0answers
3 views
SQLite, Ruby on rails. How to get the top voted objects with acts_as_votable gem?
I"m trying to display the best 3 Recipes from the last 7 days.
The best is dependant on the amount of votes it has using the acts_as_votable gem but i have not created a cache.
current user.rb, limits ...
0
votes
0answers
6 views
ImageView link to open ListView on the same activity (popup)
Hey guys im confused i have an activity that is the return tab on it there's an ImageView in that i want to link to open ListView. The ListView should POPUP in the same activity and i can select any ...
0
votes
0answers
3 views
Menu options not showing on Collapsing Toolbar
I am trying to implement a Collapsing Toolbar Layout with menu options but whenever I set the image view source in the below code, the image covers the menu and the back button. The options are there ...
0
votes
0answers
2 views
The executable was signed with invalid entitlements on Automatic Provisioning
I switched my provisioning to Automatic to try and get rid once for all of the certificate problems. Yet once I did it and for a time everything worked fine, the fearsome error:
The executable was ...
0
votes
0answers
10 views
Types of CSS Layouts
I am a beginner and still cannot understand the types of layouts, the entire layout architecture for CSS. It seems trivial, but it is hard to search on the internet. All websites I've seen divide the ...
0
votes
0answers
3 views
Problems making Grails Spring Security REST work with custom authentication provider
I have a project that works with a custom auth provider that let users login with username, password and an organization number. I created my own AuthFilter, AuthProvider and a UserPassOrgAuthToken.
...
0
votes
0answers
7 views
A better optimization for query
If I have an index on both R.B and S.E, wouldn't the most optimal way to evaluate this query is to first utilize both indexes by doing R.B = 5 and S.E = 5 first, and then do a join of R.RID = S.RID?
...
0
votes
0answers
6 views
Double Jquery Marquee animation issue + beginning before
I am trying to put a marquee inside a marquee, to have one display towards the right, and one towards the left, but there is an animation issue, it skips towards a position at the end. I don't ...
0
votes
0answers
3 views
Autocomplete hidden files in vim
In vim, when I use something like :e to open files, it doesn't autocomplete files with the hidden prefix .. For example, when trying to edit a .gitignore file, I have to type out the whole name and ...
0
votes
0answers
6 views
How to start Laravel?
Good day.
I just have started to work with laravel and i can't figured out how to set my url to get to the start page or controller.
In my routes.php i put:
Route::get('users', function()
{
...
0
votes
1answer
4 views
Edit fields of outgoing HTTP request headers in C#
Is it possible to do the same thing that Tamper Data does but within a C# program? Like if I give the program a session ID and I want that session ID inserted in every cookie sent into outgoing HTTP ...
0
votes
0answers
10 views
Removing items from cart page CoffeeScript
I managed to get my code to add/remove items from the cart and display it on a cart show page in my ruby on rails app. However, when I press on remove from cart in the show page, it is removed from ...
0
votes
1answer
10 views
Combine 2 arrays based on key javascript
I'm trying to combine two arrays based on the key "parent_id". Here are the arrays and the desired output:
Array 1: The item groups:
var itemGroups = [
{
"id":1,
"value":"Item Group 1",
...
0
votes
0answers
3 views
Object wont rotate from its last position
So I have an object, and it rotates just fine. However, this is a click and drag rotation. Whenever I rotate it to one position, it stays there, but when I try to rotate it again, it rotates from the ...
0
votes
0answers
2 views
Android - XMLPullParser not parsing entire file
I am a beginner and am having a lot of difficulties with parsing an XML from a website.
Here is the code to parse the XML after it has been downloaded into a file:
public RSSFeed readFile() throws ...
0
votes
0answers
8 views
Java - BigDecimal raised to a fractional power? [duplicate]
I'm working with the BigDecimal class, for precision. But I can't figure how to raise a BigDecimal to the power of a decimal number, without using alternate libraries. The BigDecimal.pow method only ...
0
votes
0answers
6 views
Making a website using html5 and another language to store data
I've been learning html5 and I think I got the hang of it, but it seems that it is only small part of main goal which is to make a website that can store data from a users input for access later and ...
0
votes
0answers
6 views
Change the code below so it uses sigaction instead of signal system call
Well apparently using signal system call isn't the best practice and sigaction is generally a better/safer option. I'd like to change the code below to use sigaction but am rather unfamiliar with the ...
0
votes
0answers
4 views
TADOTable - Why is Post method so slow when having large number of records?
I'm using TADOTable component (C++ Builder XE6) and my table now has about 1500 records. I noticed that Post method is pretty slow now and it's slower the more records I have. Why is this happening ...

