C# :: Algorithm For Plagiarism Detection

Mar 21, 2015

I actually want some latest algorithms, methods or techniques which can be used in plagiarism detection software for detecting the text plagiarism offline.

View 4 Replies


ADVERTISEMENT

C++ :: USB Printer Detection?

May 16, 2014

take a look at this project : [URL] i want to change this project for this purpose : when a USB PRINTER is connected show a message that tell us -> hey this is a printer. which part of this project should i change and how can i separate printer devices from the others?

note: if you are using visual studio 2010 or higher and get error for this line after conversion :

#define _WIN32_WINNT 0x403

just replace all of such these lines to stdafx.cpp file. means stdafx.cpp at last should be like this :

// stdafx.cpp : source file that includes just the standard includes
// HWDetect.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#define _WIN32_WINNT 0x403
#include "stdafx.h"

View 1 Replies View Related

C++ :: Map Collision - Camera Detection

Jan 20, 2015

Still working with SDL2 and c++ my map collision is messed up since I implemented my Camera.

I do understand that everything has a relative Position on the Screen, depending on the camera.

Problem No. 1: The camera is not moving as fast as the Player, despite having the absolutly same velocity (4/-4)??? How can this be O_o

Problem No. 2: My tile collision is totally messed now. Probably its because of the difference between the Player Position and the camera :/ So if you can solve Problem no. 1, Problem number 2 might work out on its own :)

I will upload the code to github [URL] .....

View 11 Replies View Related

C++ :: Detection Of Integer Values?

Jun 23, 2013

i am having trouble finding a way to detect integers from an external text file. i currently have this code:

while(inputfile.get(wc))
{
char character = inputfile.get(wc);
if (character + 1 != NULL)
{
cout << character << endl;
}
}

this does not work as if (character + 1 != NULL) comes up with errors.

is there a way to detect ints?

View 3 Replies View Related

C++ :: 2D Platformer Collision Detection?

May 4, 2013

I've been working on my 2D platformer for a while, and I'm running into a couple of problems. It seems to become laggy even when only about 25 entities need to do collision detection with the 8 walls in the area.

Only one thing to note: the BOOST_FOREACH(const Edge& edge, this->GetCollisonBoxEdges()) { sections actually aren't a loop, all players and enemies are basically a vertical line for purposes of hitting walls, so that's why there is some weird stuff in there (like assuming the edge is oriented a certain way, etc).

Asset::WallCollision Asset::GetClosestWallCollision(const std::vector<const Room::Wall*>& walls) const {
typedef std::pair< sf::Vector2<CoordT>, sf::Vector2<CoordT> > Edge;
const Room::Wall* wall_hit = NULL, * landing_wall = NULL;
util::intersect_ret temp, closest;
VelocityT para_vel;
if(this->m_StandingOn) para_vel = this->m_StandingOn->get_unit_parallel_vector() * this->mVelocity.x;
else para_vel = this->mVelocity;

[code].....

View 3 Replies View Related

C++ :: Repeated Word Detection Program?

Mar 6, 2015

In the C++ book Programming: Principles and Practice Using C++, there's an example code like this for detecting repeated words:

Code:
#include "std_lib_facilities.h"
int main() {
int number_of_words = 0;
string previous = " "; // previous word; initialized to "not a word"
string current; // current word
while (cin >> current) // read a stream of words

[Code].....

The header file in there is sort of like a set of training-wheels for students who are complete beginners to the language; the function keep_window_open() is defined in there and it does just that on Windows systems where the output window closes too fast (in the case of the function, it's just like cin.ignore(), except it waits for you enter a character, like 'j', before it exits); programs on my Windows laptop work fine on Code::Blocks, but when I create a .exe file for them and double-click that file, it does actually close too quickly for me to be able to see the output (if it's a program like the generic "Hello World!" program that just outputs text to the screen and then exits - so all I see is the output window just flash-by really fast in those cases).

Anyway, as for the problem I'm having with the code: there are no error and compile- or link-time, but it does behave strangely at runtime, where the part inside the curly-braces of the while-loop doesn't execute at all.

View 3 Replies View Related

C :: Simple Deadlock Detection Program

May 1, 2013

I'm trying to write a program that detects deadlock. Some of the code I already tested in an earlier stage but at this point when I run the code it somehow gets stuck. I believe that it has something to do with a negative integer value. Anyhow, the program should still work if a negative integer comes up. Here's my code so far.

Code:

#include <stdio.h>
#define FALSE 0
#define TRUE 1
int ALLOC[5][5], REQ[5][5], TOT_RES[5], process, resource, NUMB_RES=5, NUMB_PRO=5;
int TMP[5]={0}, AVAIL[5], CNTR=0, FIN[5]={FALSE}, FLAG;
}

[code]....

The program usually gets stuck after producing output displaying the "Available: " text. After that a list of tabbed numbers should appear, but it doesn't.

View 4 Replies View Related

C :: Edge Detection Done Using Processes And Pipes

Nov 30, 2014

I don't think my processes are being created the way I want. I'm trying to create a fan of process (i.e. one parent with multiple children).

I want the parent to put together the final output image, and the children are supposed to do the edge detection on various regions of the image. Here is what I have:

Code:
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "iplib2New.c"
#define FILTER_SIZE 3
//Function prototypes

[Code] ......

View 10 Replies View Related

C++ :: SDL - Tile Based Collision Detection

Oct 14, 2014

I'm still working on my Project and the next Problem has occured: How do I detect collisions on a tilebased map? My tiles are 16x16 and the map is based on the tutorial of [URL] ..... I really like this Approach because I can define for each tile of what type it should be (so a earth tile can be walkable and lead to a secret passage).

The first Number stands for what Kind of tile it should be (e.g. Grass, Earth, Water, Blank,...) and the number after ":" stands for the type of the tile (e.g. solid, walkable, do dmg to the Player,...).

e.g.
0:0 0:0 0:0 0:0 0:0 //No tile and walkable
0:0 0:0 0:0 0:0 0:0
0:0 0:0 0:0 0:0 0:0
1:1 1:1 1:1 1:1 1:1 //Grass tile and solid
2:1 2:1 2:1 2:1 2:1 //Earth tile and solid

It's working just fine with loading the Images, but i've got no clue about the collision. I've already read a lot of stuff on the Internet but I don't get how to Combine it the structure from above. For example lazyfoo describes the collision with one object like one wall. So how can I check the Player Position with each tile?

For now there's no camera, but I plan to implement one later...

I'm trying to make a 2D platformer

View 5 Replies View Related

C++ :: Implementing Collision Detection Correctly

Sep 10, 2014

I'm making a 2D Terraria-like (side-scrolling RPG with destroyable blocks) game with SFML 2.1, and I have no clue how to correctly implement collision detection. Meaning that I have been successful at making it work, but it's not clean and definitely not dynamic.

By example, I mean design wise. What parameters should collision functions take? Where should these functions be located? The same 2 questions for collision reaction. Since I have multiple things that need to collide with each other (player with enemy, player with items, enemy with items, enemy with enemy, player with player, etc...), and the world has to be treated differently, things get complicated. There is no block class, just a vertex array, so collision with the world is based purely on coordinates taken from that array in the world class, which, considering it's the world and not something like a player or an enemy, doesn't inherit from the same base class that they do.

View 7 Replies View Related

C# :: EMGU - Small Symbol Detection

Sep 16, 2014

I am trying to find the best way to detect a small symbol such as :

Just for testing features I tried to load these into SURF example that comes with EMGU and it does not pick it up... And I think the technology used for SURF is better for objects with more details and color gradients...

View 8 Replies View Related

C :: Numbers Detection In Input - Segmentation Fault

Oct 29, 2014

I need to distinguish between number (float) and other non number characters. I was trying to use this:

Code:
#include <stdio.h>
#include <ctype.h>

float Ax;
...
scanf("%f
",&Ax);
if (isdigit(Ax)) {....}

And whatever I type I receive "Segmentation fault". How can I detect that the float input is correct? Is there any built in function?

View 7 Replies View Related

C/C++ :: Find Number Of 1 In Array For Error Detection

Mar 24, 2015

I'm receiving a char array consist of 8 characters, what I want to do is find the number of set bits in that array and then send it(total number) as a character to the transmitter so he can check, data is transmitted using serial port(RS232), where processing of data is done by DE0 FPGA.I've tried to use TestBit but the compiler doesn't know this function(I added #include "bit-manipulation.h" but it doesn't recognize this either) ...

-- the code of my project:

filed = open( "/dev/uart_0", O_RDWR );
if (filed < 0){
printf("the port can't be opened
");

[Code] .....

View 1 Replies View Related

C Sharp :: Physically Connected Printers Detection?

Oct 24, 2012

How do I get the printer connected with my computer physically using cables?

View 2 Replies View Related

Visual C++ :: Low-Level Keyboard Input Detection?

Mar 13, 2014

I am writing an software that should be able to detect all keyboard inputs by the user. i.e., both hardware and software/on-screen keyboard.

This software is going to be written in a platform independent way and supposed to run on Windows, Linux, Android & iOS.

The idea is to capture the keyboard inputs from a low level, there by making sure that it doesn't miss any inputs even if it's a on-screen keyboard like in a mobile device.

I am looking at possible open source libraries that can be used.

View 1 Replies View Related

C++ :: 2D Shooter - Collision Detection Design (Monsters And Bullets)

Jul 28, 2013

I have made a simple 2d shooter (bird eye view) and want implementing the collision detection between the monsters and bullets. The problem is as follows

Each monster has locationX, locationY as coordinates.
Each monster has a Rectangle representing its collision box, (if bullet inside rectangle then its a collision).
Each bullet has locationX, locationY as coordinates as well.

pretty standard up till now.

each frame I need to check if some bullet collided with some monster.

the brutal force is to keep a list of all the bullets and monsters and to check the possibility of collision between all of them which takes O(#bullets * #monsters).

View 2 Replies View Related

C :: Can't Get Tic-tac-toe Win Algorithm To Work

Apr 9, 2014

I am writing a simple console-based tic-tac-toe game. I am trying to write a function to check whether someone has won the game.

The board data is saved in an array called board: Code: int board[3][3] with each element corresponding either to an empty spot, an X, or an O, using the numbers 0, 1, and 2, respectively. For clarity:

Code:
#define EMPTY 0
#define X 1
#define O 2 Here is my function: Code: int check_state(int board[3][3]) {
int winner = 0;

[Code].....

View 1 Replies View Related

C++ :: Algorithm For All Possible Combinations?

Mar 7, 2013

A few days ago I got a "bright idea" to see if I could match a string, with an arbitrary length from 1 to 12, to its formulated sequence by using an algorithm to find all possible combinations of the integer combinations from 0 to 9 at each length (1 to 12).

Example: Desired numerical combinations from integers 1 to 3:

At Length 1:

1, 2, 3

At Length 2:

11, 12, 13, 21, 22, 23, 31, 32, 33

At Length 3:

111, 112, 113, 121, 122, 123, 131, 132, 133, 211, 212, 213, 221, 222, 223, 231, 232, 233, 311, 312, 313, 321, 322, 323, 331, 332, 333

And so on until the nth length (in my case a length of 12).

First off, I would like to say that this is not as easy as I thought. I clearly underestimated the problem seeing as I've spent hours attempting to write a working algorithm, but feel like I've made no progress.

Here are a few of my attempts:

Attempt 1:

#include <iostream>
#include <algorithm>
#include <math.h>
#include <string>

[Code]....

I can't exactly explain this one. It works if the length is 2 or less; however, the order of the output is horrendous.

Attempt 3: I tried using recursion, but only found myself getting more and more lost the further I tried developing my function. Cannot find my work for this attempt.

I would really like to figure this out on my own, but I am very stuck as you can see. I also lack time that I can spend working on this since im a full time student.

View 14 Replies View Related

C++ :: Extending STL Algorithm

Jul 24, 2013

I wrote a version of find_all() which searches through containers for matches and returns another container that holds iterators pointing to each match. When I compared what I wrote to what the authors of Professional C++ wrote, I found the two find_all() functions to be very different.Here they are:

//Mine
template<typename Iterator, typename Predicate>
std::list<Iterator> find_all
(Iterator front, Iterator back, const Predicate& match) {
std::list<Iterator> toreturn;
for(; front != back; ++front) if(*front == match) toreturn.push_back(front);

[code]...

View 5 Replies View Related

C++ :: VRP Algorithm - Run EXE In Website

Jun 27, 2014

I have VRP algorithm written in C++, run with command prompt Windows. input (command line) -> VRP.exe -> output (txt file)

Now I want to built a website to run it as SaaS. How to run an exe application(compiled c++) in server used as Saas? What kind of programming do I have to use? Ruby or html5 or others? I don't know how to start.

View 3 Replies View Related

C++ :: Frame Per Second Algorithm?

Aug 27, 2013

i was trying to achieve a better way of game looping. so i have a game loop algrithm. but i dont think its quite good. i want it to be better.

here is my algorithm

bool quit = false;
while(quit == false) {
while(blah blah events)//here we hold events {
if(the user want to quits) {
quit = true;

[code]....

View 2 Replies View Related

C# :: Algorithm With Recursion Use

May 12, 2014

To construct and write down algorithm of determination of the sum of squares of consecutive integers with recursion use. I tried to do something:

public static int RecSumSquare(int x, int n)
{
if (n < 0) throw new ArgumentException("n should be greater than zero");
if (n == 0) return 0;
else return x*x+RecSumSquare(x, n - 1);
}

But I don't know as the beginning and the end of this algorithm will look.

View 2 Replies View Related

C++ :: Simulated Annealing Algorithm

Mar 10, 2014

I'm still a beginner at C++ programming, I have tried to implement some optimization algorithms (related to database) in C++, I cannot say it is going as far as I thought it will be, some errors does not even make sense, I will cut to the chase, I need to implement SA (Simulated Annealing) in C++, SA, which is an example of the Randomized Algorithms, functions on the concept of randomness and probability. In addition, I searched the internet with no (let say "accurate") code that might give me insight on how to begin, I only found one code for SA that I could understand, and edited it (which will be shown below), still looking to enhance and correct it more.

The code for SA is as follows:

Code:
#include "stdafx.h"
#include <iostream>
#include <time.h>
#include <stdlib.h>
#include <cmath>

[Code] .....

If the concept of Simulated Annealing is not clear, you may refer to the following papers which can be found in a simple Google search: Simulated Annealing Algorithms: an overview.An Introduction to Interacting Simulated Annealing. Query Optimization (there is a sub-section for Simulated Annealing in this paper that explains SA briefly) ....

View 6 Replies View Related

C++ :: Algorithm To Roll A Rectangle

Sep 17, 2014

I'm trying to draw and pivot a rectangle. How to get the new coordinates if I turn it 90 degree for example?

From this:

To this:

This is not good because it will reduce it in size.

Code:
int size = 50;
if(b) // draw rectangle
{
POINT points[4] =
{{xCoord, yCoord},

[Code] ....

View 7 Replies View Related

C++ :: Multiplying Matrix Using Algorithm

Jun 3, 2013

Trying to multiply to matrixes using the following algorithm,

Code:
ABrec(A,B)
n=A.rows; //n must be multiple of 2
C is a new n*n matrix.
if(n==1)
C[0][0]=A[0][0]*B[0][0];

[Code] ....

but the code doesn't work !!!

View 4 Replies View Related

C :: Algorithm To Calculate Highest Value?

Aug 3, 2014

Now I know there's a simple way to calculate highest value. But here i have this algorithm which i understood part of it.

I know that *largest is point to the first element of begin which is 5. so in the first if statement its 5<5 at the first iteration ?

// i marked the parts i didnt understand with " //"

Code:
#include <stdio.h>
int *print(int *begin ,int *end ){
if(begin==end)
return 0;
int *largest = begin;

[Code] ....

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved