i want to make a windows application in ansi c but suffering with graphic usage is ansi c able to handle the graphics of windows without using any extra lib. guide line required.
As you can see from the picture i want my float: right, div box that contains this video to like "be there" and not floating there, i mean i want the hr line and commentsystem(the whiteblack boxes you see) under the video, i suck at explaining but if you dont follow please comment..
heres my css
#sctryclip{
float: right;
border: 2px solid #FF3399;
display: inline-block;
}
I need to create a use case (using Selenium) in which I send HTTP calls with a Cookie through the browser and capture the return value in a text file.
What do I need to do this, I have run this using CURL in the command line, but we are encountering issues with the same, and hence wish to verify using a real UI browser.
import java.util.Scanner;
import java.util.Timer;
import java.util.TimerTask;
public class Boggle {
Board board;
Player player;
Timer timer;
boolean active;
static Scanner in = new Scanner(System.in);
public Boggle() {
board = new Board(4);
timer = new Timer();
}
public void newGame() {
System.out.println("Please enter your name: ");
String line = in.nextLine();
player = new Player(line);
active = true;
board.shuffle();
System.out.println(board);
timer.schedule(new timesUP(), 20000);
while(active) {
String temp = in.nextLine();
player.addGuess(temp);
}
}
public void endGame() {
active = false;
int score = Scoring.calculate(player, board);
System.out.println(score);
}
class timesUP extends TimerTask {
public void run() {
endGame();
}
}
public static void main(String[] args) {
Boggle boggle = new Boggle();
boggle.newGame();
}
}
I have the above class which should perform a loop for a given length of time and afterwards invoke an instance method. Essentially I need the loop in newGame() to run for a minute or so before endGame() is invoked on the current instance. However, using the Timer class I'm not sure how I would invoke the method I need on the current instance since I can't pass any parameters to the timertasks run method?
Is there an easy way to do this or am I going about this the wrong way? (note: this is a console project only, no GUI)
==========
code edited
I've changed the code to the above following the recommendations, and it works almost as I expect however the thread still doesnt seem to end properly. I was the while loop would die and control would eventually come back to the main method. Any ideas?
Not used memcpy much but here's my code that doesn't work.
memcpy((PVOID)(enginebase+0x74C9D),(void *)0xEB,2);
(enginebase+0x74C9D) is a pointer location to the address of the bytes that I want to patch.
(void *)0xEB is the op code for the kind of jmp that I want.
Only problem is that this crashes the instant that the line tries to run, I don't know what I'm doing wrong, any incite?
I would like for someone to explain this to me:
function myFunction(array){
array = $.grep(array, function(n,i){return n > 1 });
}
var mainArray = [1,2,3];
myFunction(mainArray);
document.write(mainArray) // 1,2,3, but i'm expecting 2,3
but if i do something like
array[3] = 4;
in place of the $.grep line, i get 1,2,3,4. Shouldn't mainArray become the new array created by $.grep?
I'm tying to hide my slug fields in the admin by setting editable=False but every time I do that I get the following error:
KeyError at /admin/website/program/6/
Key 'slug' not found in Form
Request Method: GET
Request URL: http://localhost:8000/admin/website/program/6/
Exception Type: KeyError
Exception Value:
Key 'slug' not found in Form
Exception Location: c:\Python26\lib\site-packages\django\forms\forms.py in __getitem__, line 105
Python Executable: c:\Python26\python.exe
Python Version: 2.6.4
Any idea why this is happening
I'm reading a bunch of MySQL files that use # (to end-of-line) comments, but my sql-mode doesn't support them. I found the syntax-table part of sql.el that defines /**/ and -- comments, but according to this, Emacs syntax tables support only 2 comment styles.
Is there a way to add support for # comments in sql.el easily?
Hey,
I'm trying to dynamically add a validation rule to some dynamic controls:
$("input[id*=Hours]").rules("add", "required");
However this line gives me the following error:
$.data(element.form, "validator") is null
Defining rules the static way with the validate function works fine. What am I doing wrong?
Thanks,
Justin
In config.php, if i uncomment the following line
$config->useGehsi();
Suddenly, when I load up a C# file, instead of showing the document, it's just a blank page. As soon as I comment out the code above, I'm able to see my C# file, but there's no syntax highlighting.
Anyone have a solution to get GeSHi working with WebSVN when this kind of error occurs?
Digital Mars D seems to be very good programming language in a lot of ways, but my only problem with it is the amount of time wasted writing arguments to the compiler in the command line at the old fashion way. Is there any good IDE for D?
Thanks in advance!
Hello i am using vim and snipMate i very times i need to name the html files to php, just because 1 or 2 lines of code.
I every time i create an php file no introduce html and i have to activate the html snippets manually with the command
set ft=php.html
I intend to activate it automatically in this this line on my vimrc
autocmd BufREad, BufNewFile *.php set ft=php.html
Is this correct? I am missing anything or is something wrong?
Thanks already.
sub new
{
my $class = shift;
my $ldap_obj = Net::LDAP->new( 'test.company.com' ) or die "$@";
my $self = {
_ldap = $ldap_obj,
_dn ='dc=users,dc=ldap,dc=company,dc=com',
_dn_login = 'dc=login,dc=ldap,dc=company,dc=com',
_description ='company',
};
# Print all the values just for clarification.
bless $self, $class;
return $self;
}
what is wrong on this code :
i got this error Can't modify constant item in scalar assignment at Core.pm line 12, near "$ldap_obj,"
I'm running in to an error when I try to run my server application from Eclipse. The error is java.net.BindException: Permission denied. I think this is because I am using port 443 to set up an SSL connection. I can get around this problem if I run my code on the command line using javac and sudo. Is there a way to set up Eclipse so that when I hit the run button, my application is executed with sudo?
The following works as expected:
d = [(1,2), (3,4)]
for k,v in d:
print "%s - %s" % (str(k), str(v))
But this fails:
d = collections.defaultdict(int)
d[1] = 2
d[3] = 4
for k,v in d:
print "%s - %s" % (str(k), str(v))
With:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'int' object is not iterable
Why? How can i fix it?
intellij has placed what look like no entry signs over my java files (red circles with a line through) searched around but cannot find why? Would anyone know please.
It's a maven project if that makes a difference
Preface: This works on one Oracle 11gR1 (Solaris 64) database and not on a second and we can't figure out the difference between the two databases. Somehow the complexType causes the validation to fail with this error:
ORA-31154: invalid XML document
ORA-19202: Error occurred in XML processing
LSX-00200: element "shiporder" not empty
ORA-06512: at "SYS.XMLTYPE", line 354
ORA-06512: at line 13
But the schema is valid (passes this online test: http://www.xmlme.com/Validator.aspx)
-- Cleanup any existing schema
begin
dbms_xmlschema.deleteschema('shiporder.xsd',dbms_xmlschema.DELETE_CASCADE);
end;
-- Define the problem schema (adapted from http://www.w3schools.com/schema/schema_example.asp)
begin
dbms_xmlschema.registerSchema('shiporder.xsd','<?xml version="1.0" encoding="ISO-8859-1" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="shiporder">
<xs:complexType>
<xs:sequence>
<xs:element name="orderperson" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>',owner=>'SCOTT');
end;
-- Attempt to validate
declare
bbb xmltype;
begin
bbb := XMLType('<?xml version="1.0" encoding="ISO-8859-1"?>
<shiporder
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="shiporder.xsd">
<orderperson>John Smith</orderperson>
</shiporder>');
XMLType.schemaValidate(bbb);
end;
Now if I gut the schema definition and leave only a string in the XML then the validation passes:
begin
dbms_xmlschema.deleteschema('shiporder.xsd',dbms_xmlschema.DELETE_CASCADE);
end;
begin
dbms_xmlschema.registerSchema('shiporder.xsd','<?xml version="1.0" encoding="ISO-8859-1" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="shiporder" type="xs:string"/>
</xs:schema>',owner=>'SCOTT');
end;
DECLARE
xml XMLTYPE;
BEGIN
xml := XMLTYPE('<?xml version="1.0" encoding="ISO-8859-1"?>
<shiporder
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="shiporder.xsd">
John Smith
</shiporder>');
XMLTYPE.schemaValidate(xml);
END;
I installed Eclipse and then the Ruby Development Tools (RDT), but it would crash when I try to alter certain features, like having line numbers, how far back to have history, and the code coloring scheme didn't work fully. I decided to try to uninstall Eclipse by doing sudo aptitude remove eclipse and then sudo aptitude install eclipse but instead it installed it back with the broken Ruby plugin. I also tried aptitude purge but that didn't help either.
How can I freshly reinstall eclipse and get a properly working Ruby plugin?
I'm using Netbeans 6.9 RC2 and Maven OSGi Bundle project template. Actually i dont want to test my bundles in Netbeans environment so i copy the jar file to the OSGi container directory and install it from command line. But when i want to see its headers from OSGi console, i see a lot of Netbeans related unnecessary stuff. Is it possible to edit the contents of the manifest file in Netbeans?
I get the following error from the SQL Script I am trying to run:
Msg 102, Level 15, State 1, Line 10
Incorrect syntax near ','.
This is the SQL script:
IF NOT EXISTS (SELECT *
FROM dbo.sysobjects
WHERE id = OBJECT_ID(N'[dbo].HDDB_DataSource]')
AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[HDDB_DataSource](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Name] [nvarchar](255) NOT NULL,
[Type] [nvarchar](50) NOT NULL,
[XmlFileName] [nvarchar](255) NULL,
[ConnectionString] [nvarchar](255) NULL),
CONSTRAINT [PK_DataSource] PRIMARY KEY CLUSTERED
(
[ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
I am using SQL Server 2005 if that helps.
Jeff
I found this in Ryan Bates' railscast site, but not sure how it works.
#models/comment.rb
def req=(request)
self.user_ip = request.remote_ip
self.user_agent = request.env['HTTP_USER_AGENT']
self.referrer = request.env['HTTP_REFERER']
end
#blogs_controller.rb
def create
@blog = Blog.new(params[:blog])
@blog.req = request
if @blog.save
...
I see he is saving the user ip, user agent and referrer, but am confused with the req=(request) line. Any help is appreciated.
Thanks
For example, suppose I have this:
001, "john doe", "male", 37, "programmer", "likes dogs, women, and is lazy"
The problem is that the line is only supposed to have 6 fields. But if I separate it with split I get more, due to the comma being used improperly to separate the fields.
Right now I'm splitting everything, then when I get to the 5-th index onward I concatenate all the strings. But I was wondering if there was a split(",",6) or something along these lines.
Hi,
I want to set the svn:needs-lock property on a local directory, and then to commit it.
I want to do it from the command line and it seems to not letting me.
my command is:
svn propset svn:needs-lock '*' d:\src_svn\Multilizer
the answer I get is:
svn: Cannot set 'svn:needs-lock' on a directory ('D:\src_svn\Multilizer')
what can be the problem?
thank you.