Hi all,
quick question (which might be a no-brainer for most here) :)
My code below should draw a circle for every time touch that is recognised but although more than ones touches are sensed only one circle will drawn up at a time.
Can anyone see any obvious issues?
This method sits in the XYZViewControler.m class.
TouchPoint.m is the class that defines the circle.
Thanks a bundle for your help and redirects.
Chris
- (void) touchesBegan: (NSSet *) touches withEvent: (UIEvent *)event {
NSSet * allTouches = [event allTouches]; // get all events
for (UITouch * touch in touches) {
TouchPoint * touchPoint = [[TouchPoint alloc] initWithFrame:CGRectMake(0, 0, circleWidth, circleWidth)];
touchPoint.center = [touch locationInView:[self view]];
touchPoint.color = [UIColor redColor];
touchPoint.backgroundColor = [UIColor whiteColor];
[[self view] addSubview: touchPoint];
[touchPoint release];
CFDictionarySetValue(touchMap, touch , touchPoint);
}
[[self view] setNeedsDisplay];
}
I am running Eclipse CDT 6.0.2 on a SLES 11 x86_64 platform.
My project is of linuxtools type.
I am getting the following error running builds:
"
../libtool: line 747: echo: write error: Broken pipe
make[2]: write error
make[1]: *** [all recursive] Error 1
make[1]: write error
make: *** [all recursive] Error 1
"
Any help is appreciated.
Hello all,
I'm trying to achieve the following:
I have two hosts A and B. A establishes a remote port forwarding tunnel on B, i.e. B is the one a port is forwarded on to some where else and A is the one that sets up the tunnel. I tried the script rforward.py that ships with paramiko and it works very well so far. (I'm running rforward.py on A, which connects to B and forwards a port of B to somewhere else)
However, when B is shutting down, A doesn't seem to recognize it. I'd rather like A to recognize that B is down and to try to reestablish the connection periodically in case B comes up again.
Is there a way to do this? Thanks.
I need to let users select an item from a dropdown list, but also allow them to instead enter any text, even if it doesn't match an item in the list. How can I achieve this on a web page with HTML and Javascript?
The select field doesn't let users enter text, and the input text field doesn't show the preferred alternatives.
All items must show if the user opens the dropdown, so it can't be a simple auto-complete that only shows matching items.
I currently am working on an autoloader class for one of my projects. Below is the code for the controller library:
public static function includeFileContainingClass($classname) {
$classname_rectified = str_replace(__NAMESPACE__.'\\', '', $classname);
$controller_path = ENVIRONMENT_DIRECTROY_CONTROLLERS.strtolower($classname_rectified).'.controller.php';
if (file_exists($controller_path)) {
include $controller_path;
return true;
} else {
// TODO: Implement gettext('MSG_FILE_CONTROLLER_NOTFOUND')
throw new Exception('File '.strtolower($classname_rectified).'.controller.php not found.');
return false;
}
}
And here's the code of the file I try to invoke the autoloader on:
try {
spl_autoload_register(__NAMESPACE__.'\\Controller::includeFileContainingClass');
} catch (Exception $malfunction) {
die($malfunction->getMessage());
}
// TESTING ONLY
$test = new Testing();
When I try to force a malfunction, I get the following message:
Fatal error: Uncaught exception 'Exception' with message 'File testing.controller.php not found.' in D:\cerophine-0.0.1-alpha1\application\libraries\controller.library.php:51 Stack trace: #0 [internal function]: application\Controller::includeFileContainingClass('application\Tes...') #1 D:\cerophine-0.0.1-alpha1\index.php(58): spl_autoload_call('application\Tes...') #2 {main} thrown in D:\cerophine-0.0.1-alpha1\application\libraries\controller.library.php on line 51
What seems to be wrong?
How to create a .BAT file to download file or folder from FTP server? (and replace with it existing file) (we have links like ftp://me:[email protected]/file.file and absolute file link like C:\Users\UserName\Some mixed ??????? English Adress\file.file) (using only native windows (xp vista win7 etc) BAT functions and files)
I've got the following string:
response: id="1" message="whatever" attribute="none" world="hello"
The order of the attributes is random. There might be any number of other attributes.
Is there a way to get the id, message and world attribute in one regular expression instead of applying the following three one after another?
/ message="(.*?)"/
/ world="(.*?)"/
/ id="(.*?)"/
I need an open source project with an API
capable of reading a live video stream (stream codec can be any API can read - I can provide with practically any live streamable one)
giving me last image data for some processing (like brightness\contrast or more exotic filtering)
being able to receive data I've changed and starting to stream that data on to some http://localhost:port/ in some format
I need it to be easily accessible from C# (even better, written in C#).
It's possible to commit files that contains conflict data. Is there a way to mark these files as conflicted again, so that running git mergetool will generate the necessary files and run the merge tool?
What if I need to add a class to the options tag?
testme1
I haven't been able to do this.
This is what I have
<%= select(:user, :goalstext, Bodytarget.all.collect {|b| [ b.name, b.id ] }, {"class", "test"}, :class = "selected", :class = "selected") %
I create a div that when is clicked it executes an jquery script, but the problem I have is that in the animation there is a link, when you click on the link the links is execute as well as the animation but it does not let the animation to end. Is there a way to let know Jquery that when the links its executed wait for the animation to end and then go to the link?
I have A form like this:
<form>
<fieldset class="ui-widget-content ui-corner-all">
<select id="Streams" class="multiselect ui-widget-content ui-corner-all" multiple="multiple" name="Streams[]">
<br />
<option value="35"> Example Name (35)</option>
<option value="44"> Example Name (44)</option>
<option value="5698"> Example Name (5698)</option>
<option value="777"> Example Name (777)</option>
<option value="12"> Example Name (12)</option>
</select>
<br/>
<input type="submit" class="ui-state-default ui-corner-all" name="submitForm" id="submitForm" value="Play Stream from selected URL's!"/>
</fieldset>
</form>
in my JS + HTML page I use JQuery.
As you can see I allow user to select multiple Items.
I want to open on Submit button click as many popup windows as many Items he selected in a list. Each popUp window should open some url like www.example.com/test.php?id=OPTION_SELECTED .
So for each of the selected options I ll get a pop up window whith different url.
Please Help.
I have A HTML form like this:
<form>
<fieldset class="ui-widget-content ui-corner-all">
<select id="Streams" class="multiselect ui-widget-content ui-corner-all" multiple="multiple" name="Streams[]">
<option value="35"> Example Name (35)</option>
<option value="44"> Example Name (44)</option>
<option value="5698"> Example Name (5698)</option>
<option value="777"> Example Name (777)</option>
<option value="12"> Example Name (12)</option>
</select>
<input type="submit" class="ui-state-default ui-corner-all" name="submitForm" id="submitForm" value="Play Stream from selected URL's!"/>
</fieldset>
</form>
in my JS + HTML page I use JQuery.
As you can see I allow user to select multiple Items.
I want to open on Submit button click as many popup windows as many Items he selected in a list. Each popUp window should open some url like www.example.com/test.php?id=OPTION_SELECTED .
And here I mean by PopUp Window a real browser window.
So for each of the selected options I ll get a pop up window whith diferent url.
Please Help.
What NEW features has WCF in .NET Framework 4 vs .NET Framework 3.5? What Is new, what was fixed (in general - I do not want to get into bug fixed numbers=)?
Is there any free Python to C translator? for example capable to translate such lib as lib for Fast content-aware image resizing (which already depends on some C libs) to C classes and files?
So I have a local URL like http://localhost:8090/feed1.ffm with live video stream in it. I need to send it over TCP to http://222.22.22.22:8090/feedReciver how to do such thing in WPF, C#?
How can I get video and audio streams from web cameras with Java (in a cross-platform way)?
For example, we have a computer with 3-4 USB web cameras; we want to get their streams and make them visible in the user interface. How can we perform such a thing?
I use ServiceHost for hosting WCF cervices.
I want to host near to my WCF services my own tcp programm (like WCF service but with out WCF) for direct sockets operations (like lien to some sort of broadcasting TCP stream)
I want to use ServiceHost for somehow simplyfiing proces of creating my TCP sender\listener, to somehow control namespaces (so I would be able to let my clients to send TCP streams directly into my service using some nice URLs like www.example.com:34123/myserver/stream?id=1 or www.example.com:34123/myserver/stream?id=222 and so that I will not be bothered with Idea of 1 client for 1 socket at one time moment, BTW I realy want to keep my WCF services on the same port as my own server or what it is...)
Can any body please help me with this?
Hi,
many questions are close, but none answers my problem...
How do I use reflection in C# 3.5 to get all classes which are static from an assembly. I already get all Types defined, but there is no IsStatic property. Counting 0 constructors is really slow and did not work either.
Any tips or a line of code? :-)
Chris
So I have an upload script, and I want to check the file type that is being uploaded. I only want pdf, doc, docx and text files
So I have:
$goodExtensions = array('.doc','.docx','.txt','.pdf', '.PDF');
$name = $_FILES['uploadFile']['name'];
$extension = substr($name, strpos($name,'.'), strlen($name)-1);
if(!in_array($extension,$goodExtensions) || (($_FILES['uploadFile']['type'] != "applicatioin/msword") || ($_FILES['uploadFile']['type'] != "application/pdf"))){
$error['uploadFile'] = "File not allowed. Only .doc, .docx, .txt and pdf";
}
Why I'm getting the error when testing and including correct documents?