[QUOTE=esalaka;31608691]Or maybe it uses the latest installed package?[/QUOTE]
Meaning I'm going to have to fix it every update :\
[QUOTE=ROBO_DONUT;31610001]Meaning I'm going to have to fix it every update :\[/QUOTE]
Try to chmod -w it
I'm using C#, WPF, and the Skype API
Basically I want to close a skype chat window when a message is recieved.
I've achieved a basic implementation of this using winapi functions to find the window by the title and close it, but this method isn't very friendly with Skype because it doesn't seem to know the window is closed and ends up crashing. Is there a better way to close a window? Perhaps the gui framework it uses has a way?
I'm using C++ and i'm trying to set up SFML 1.6, but I am getting an error in dev-c++ when I compile a test program. It can't find -lsfml-graphics, but I don't know what I missed. Sorry if this seems like a pretty amateur mistake or problem, i'm pretty bad at this.
Your error is Dev-C++. Use something that's not five years old, would you kindly, such as Code::Blocks.
Well can you at least help me convert my current code to work with Code::Blocks?
[QUOTE=Killowatt;31613743]Well can you at least help me convert my current code to work with Code::Blocks?[/QUOTE]
It shouldn't need any conversion.
So I am trying to make a 2D SFML Game.
[img]http://tgh.vg/f/1_3.jpg[/img]
That is what I am kinda trying to make it look like, at least with tile-based and I would like it simple with something that looks like.
[code]
void dosomething()
{
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
}
[/code]
or something like that, and later i can make a simple program that can make it easier by placing them in the program and what not. I just need to figure out how to apply the images to the numbers or so on.
A tutorial would very much be appreciated!
I need to write a program that will help a carpet layer. He gets rolls of carpet in 30mx5m rolls and has a max size room of 20mx20m he needs to figure out how many meters of carpet he will need to cover a room, how many rolls of carpet will be used and how much full-width carpet he will have left on the last roll.
So so far I get there will be a x and y variable but I can't think of how to solve this, any ideas?
I am unable to build V8 with SConstruct on Windows.
[img]http://images.overvprojects.nl/SS-2011-08-10_03.18.50.png[/img]
Why does it work fine if I enter the command myself and not when scons runs it?
Possibly something to do with the working directory?
[QUOTE=Agent766;31638719]Possibly something to do with the working directory?[/QUOTE]
Yeah, turns out SConstruct doesn't use your normal PATH variable. It uses its own...
How does one go about downloading a video from a site like youtube, the actual process of course not like a program for it. I want to make my own.
[QUOTE=Dehodson;31641489]How does one go about downloading a video from a site like youtube, the actual process of course not like a program for it. I want to make my own.[/QUOTE]
Each video is stored as a .flv somewhere on youtube servers. Connect to the provided URL, recieve back the webpage, search for ".flv" and then download the URL that's attached to the ".flv" you found. I've never made one myself, but doing something like that would be a good place to start.
[QUOTE=Dehodson;31641489]How does one go about downloading a video from a site like youtube, the actual process of course not like a program for it. I want to make my own.[/QUOTE]
[url]https://github.com/rg3/youtube-dl/blob/master/youtube-dl[/url]
This is pissing me off. :v:
Okay, in C#, I have a function with a graphics object. I generate a random curve using the graphics object, and call the DrawCurve() function (which then draws the curve to my bitmap).
[code]for (int i = 0; i < 10; i++)
{
AddHorizontalPaths(cmApply, hmApply, new Pen(color, (float)rand.Next(10, 20)));
// cmApply is a bitmap object
// hmApply is another bitmap object
}[/code]
[code]static void AddHorizontalPaths(Graphics cmApply, Graphics hmApply, Pen style)
{
code that adds random x,y points to a fixed size array
cmApply.DrawCurve(style, pt);
hmApply.DrawCurve(style, pt);
}[/code]
However, I try to use a for loop and call my function more than once, so I can draw several curves on my bitmap instead of one, but it's not working. When I look at my bitmap (that my program outputs) it's always one curve being drawn, even though I have a for loop which is meant to draw 10 curves.
I tried debugging my program and the curves my function generates is random each time, so I know the problem isn't the program drawing the exact same curve at the exact same point 10 times.
I need help for conectung and using a SQL database in visual studio c# Express edition.
I have no experienc with workin with databases in c#.I want to open a database and write data to it.It will contain only one table with fields like single and dateTime and i want to get the values from my program and constantly append to the database.Please guide me with the sipliest way or/and show me a tutorial a tutorial for databases in C#.
Thanks in advance. :dance:
How do you find the end of a character array?
I've been trying to do this for a couple of hours now and I can't seem to get it working correctly.
It's something along these lines, but it's not working for some reason:
[code]
void printArray(char Array[])
{
Ptr1--;
char * Ptr1 = Array;
while ((*Ptr1 != ' ') || (*Ptr1 != '\0'))
{
cout << *Ptr1 << " ";
*Ptr1++;
}
cout << endl;
}
[/code]
[QUOTE=thelinx;31643264][url]https://github.com/rg3/youtube-dl/blob/master/youtube-dl[/url][/QUOTE]
Wow, that's exactly what I needed. Thank you.
[QUOTE=RiceWarrior;31648686]How do you find the end of a character array?
I've been trying to do this for a couple of hours now and I can't seem to get it working correctly.
It's something along these lines, but it's not working for some reason:
[code]
void printArray(char Array[])
{
Ptr1--;
char * Ptr1 = Array;
while ((*Ptr1 != ' ') || (*Ptr1 != '\0'))
{
cout << *Ptr1 << " ";
*Ptr1++;
}
cout << endl;
}
[/code][/QUOTE]
[cpp]
void printArray(char *Array)
{
while (*Array != '\0')
{
std::cout << *Array << " ";
Array++;
}
std::cout << std::endl;
}
[/cpp]
Or you could do this:
[cpp]
void printArray(char Array[])
{
for (int i = 0; Array[i] != '\0'; i++)
{
std::cout << Array[i] << " ";
}
std::cout << std::endl;
}
[/cpp]
Thanks, I've been having trouble with this for too long. I don't know why it didn't occur to me to use a pointer in the arguments.
Such is the life of a newbie.
[QUOTE=RiceWarrior;31649166]Thanks, I've been having trouble with this for too long. I don't know why it didn't occur to me to use a pointer in the arguments.
Such is the life of a newbie.[/QUOTE]
A pointer is exactly the same as an array when it comes to function arguments. This function:
[cpp]
void printArray(char *Array)
{
while (*Array != '\0')
{
std::cout << *Array << " ";
Array++;
}
std::cout << std::endl;
}
[/cpp]
Might as well have been written like this:
[cpp]
void printArray(char Array[])
{
while (*Array != '\0')
{
std::cout << *Array << " ";
Array++;
}
std::cout << std::endl;
}
[/cpp]
With the exact same result.
The only problem with your code is, I think, that you're trying to reduce Ptr1 by one before it exists.
[QUOTE=thf;31649310]
The only problem with your code is, I think, that you're trying to reduce Ptr1 by one before it exists.[/QUOTE]
Gotcha, my code kept outputting some random characters. But I didn't realize that you have to leave an extra element of space in order to have the NULL character be valid and work as a way to end the while loop.
Is there a way to use c# to get incoming web requests, I want to get variables from the post variable to compile a custom .exe for each client. I will be running this on a windows 2008 server.
[QUOTE=quincy18;31652022]Is there a way to use c# to get incoming web requests[/QUOTE]
If you can use ASP.NET, you can use C#.
I have tried looking into that but asp.net is so confusing and I can't find any proper tutorials just to set up a blank page that runs a piece of c# code
(SFML)
If I have a RenderWindow instance declared in my main function and I have a class that is stored in its own header and source files, how can I get a pointer that is part of the class to reference the RenderWindow?
I am trying to get a class object to draw a sprite to the RenderWindow without having me explicitly tell it to in the main function every time it needs to be drawn. I'd rather it automatically drew to the RenderWindow via its own draw function.
[QUOTE=quincy18;31653103]I have tried looking into that but asp.net is so confusing and I can't find any proper tutorials just to set up a blank page that runs a piece of c# code[/QUOTE]
[url=http://asp.net-tutorials.com/basics/code-behind/]This help[/url]?
You might also want to ask the Webdev forum
Just coded an entity manager but if I create a new entity while the entity manager is running Tick() the program crashes. Anyone see why?
[cpp]
#include "EntityManager.h"
EntityManager* Inst = NULL;
EntityManager* EntityManager::Instance()
{
if (Inst == NULL)
{
Inst = new EntityManager;
}
return Inst;
}
EntityManager::EntityManager(void)
{
}
EntityManager::~EntityManager(void)
{
}
void EntityManager::Tick()
{
std::vector<BaseEntity*>::iterator i;
for (i=Entities.begin(); i != Entities.end(); i++)
{
BaseEntity *ent = *i;
ent->Think();
}
}
BaseEntity* EntityManager::CreateEntity(std::string ID, sf::RenderWindow *App)
{
BaseEntity* ent = FactoryMap[ID]->Create(App);
Entities.push_back(ent);
return ent;
}
void EntityManager::RegisterEntity(std::string Name, BaseFactory* Factory)
{
std::cout << "Registering: " << Name << "\n";
FactoryMap[Name] = Factory;
}
[/cpp]
[QUOTE=esalaka;31653240][url=http://asp.net-tutorials.com/basics/code-behind/]This help[/url]?
You might also want to ask the Webdev forum[/QUOTE]
-nvm this shit was bullshit-
Sorry, you need to Log In to post a reply to this thread.