OpenCL 1.0 came with nVidia driver for Mac OS X 10.6. I wonder if/how it is possible to update header files to utilize OpenCL 1.1 API. Greatly appreciate in advance.
Hello Friends,
Actually I am working on Pdf by using IReport Software. This software provided two detail section but i want this two detail section with Column Header .then say me how i changes it
reply me on [email protected]
I'm using jsdom with node.js and I'm trying to get it to provide me with some indication that an http error has occurred. I've set up a test server that simply returns an http 500 header for all requests, but when I attempt to load it with jsdom, jsdom doesn't throw any error and doesn't seem to provide me with any information that would identify that an http 500 error was returned. What's the best way to detect an http 500 error?
How to call the function in Objective-c.
for Example:-
I define the function in header (.h file):-
-(void)abc
and implement this function in implementation file( .m file):-
-(void)abc
{
//.....
///....
}
now how would i call this function on that place where i need it..?????
I'd looking to emulate the standard google visualization table header row behavior, but have it apply to the first column. This doesn't seem to be a built-in feature, but I'm wondering if it can be accomplished with some custom CSS?
Hello,
I have tried to include openssl (I try to implement a ssh client) and I've added libssl.dylib to my XCode Project. But I don't know which header I have to include to use it.
Can anyone show me a tutorial how to use libssl in xcode?
thanks
I have a problem with extra white lines showing up under my list items. It's not a border as I haven't set any borders, except the one under My Account, it's just to show that the white line is not a border. The one under it is -- a 4px border the same color as the background.
This problem occurred after I had resolved a conflict between my Nivo Slider and the Woocommerce plugin on my WP site. I got both of them to work together, but then this other issue with the list cropped up. Any ideas as to what caused this and how to fix it?
Here's my CSS if that helps:
#header #navigation ul.nav > li.current_page_item > a
{ color: #D4145A;}
#header #navigation ul.nav > li:hover a {
border-width: 0px 0px 4px;
border-style: none none solid;
border-color: -moz-use-text-color -moz-use-text-color rgb(212, 20, 90);
-moz-border-top-colors: none;
-moz-border-right-colors: none;
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
border-image: none;
background: none repeat scroll 0% 0% rgb(212, 20, 90);}
and the HTML for it too:
<nav id="navigation" class="col-full parent" role="navigation">
<ul id="main-nav" class="nav fl parent">
<li class="page_item"></li>
<li class="page_item page-item-11"></li>
<li class="page_item page-item-12"></li>
<li class="page_item page-item-13 parent"></li>
<li class="page_item page-item-15 current_page_item parent">
<a href=""></a>
<ul class="children"></ul></li>
</ul>
</nav>
Help please! I'm at my wits' end! Thanks!
Apache keeps serving up my Rails files with a Content-Type of 'text/plain' in the header. I have mod_mime installed, a mime.types files with all the correct MIME assignments, and the following code in my configuration. Any thoughts?
DefaultType text/plain
<IfModule mime_module>
TypesConfig /etc/apache2/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>
hi,
I've a View page with all the content of my website (the node headers). When I click on one of these header I would like to load the complete node without refreshing the page and display it on the left.
Which modules could I use for it ? I'm currently using a lightbox (moving the content beside it). I was wondering if this the only solution and if it is a good one
thanks
The description of the problem I am having is a bit complicated, and I will err on the side of providing more complete information. For the impatient, here is the briefest way I can summarize it:
What is the fastest (least execution
time) way to split a text file in to
ALL (overlapping) substrings of size N (bound N, eg 36)
while throwing out newline characters.
I am writing a module which parses files in the FASTA ascii-based genome format. These files comprise what is known as the 'hg18' human reference genome, which you can download from the UCSC genome browser (go slugs!) if you like.
As you will notice, the genome files are composed of chr[1..22].fa and chr[XY].fa, as well as a set of other small files which are not used in this module.
Several modules already exist for parsing FASTA files, such as BioPython's SeqIO. (Sorry, I'd post a link, but I don't have the points to do so yet.) Unfortunately, every module I've been able to find doesn't do the specific operation I am trying to do.
My module needs to split the genome data ('CAGTACGTCAGACTATACGGAGCTA' could be a line, for instance) in to every single overlapping N-length substring. Let me give an example using a very small file (the actual chromosome files are between 355 and 20 million characters long) and N=8
import cStringIO
example_file = cStringIO.StringIO("""\
header
CAGTcag
TFgcACF
""")
for read in parse(example_file):
... print read
...
CAGTCAGTF
AGTCAGTFG
GTCAGTFGC
TCAGTFGCA
CAGTFGCAC
AGTFGCACF
The function that I found had the absolute best performance from the methods I could think of is this:
def parse(file):
size = 8 # of course in my code this is a function argument
file.readline() # skip past the header
buffer = ''
for line in file:
buffer += line.rstrip().upper()
while len(buffer) = size:
yield buffer[:size]
buffer = buffer[1:]
This works, but unfortunately it still takes about 1.5 hours (see note below) to parse the human genome this way. Perhaps this is the very best I am going to see with this method (a complete code refactor might be in order, but I'd like to avoid it as this approach has some very specific advantages in other areas of the code), but I thought I would turn this over to the community.
Thanks!
Note, this time includes a lot of extra calculation, such as computing the opposing strand read and doing hashtable lookups on a hash of approximately 5G in size.
Post-answer conclusion: It turns out that using fileobj.read() and then manipulating the resulting string (string.replace(), etc.) took relatively little time and memory compared to the remainder of the program, and so I used that approach. Thanks everyone!
I have the ReportBlock from the type VTable that I am modifying. I am able to get the horizonatal block axis to modify the cells but, I cannot seem to modify the column header (different object).
I started to look into trying to get back a smalltable but, I am not confident in this approach.
Any idea?
After switching on some debug options in Xcode, it now tells me the following in the output:
GuardMalloc[Roadcast-4010]: free: magic is 0x0000090b, not 0xdeadbeef.
GuardMalloc[Roadcast-4010]: free: header magic value at 0x43f49bf0, for block 0x43f49c00-0x43f50000, has been trashed by a buffer underrun.
GuardMalloc[Roadcast-4010]: Try running with MALLOC_PROTECT_BEFORE to catch this error immediately as it happens.
How do I switch on MALLOC_PROTECT_BEFORE?
Is there a way to access ruby variables in sass or do i have to make a custom function for it?
What im trying to do is to generate a stylesheet for each user so in the controller, i do something like:
def show
respond_to do |format|
format.css{render :partial => "styles"}
end
end
then in the view name _styles.haml i do this:
:sass
#header
:background url(user.banner.url)
is this possible at all?
Hi, I am trying to send raw xml to a service in Python. I have a the address of the service and my question is how would I wrap XML in python and send it to the service. The address is in the format below.
192.1100.2.2:54239
And say the XML is:
<xml version="1.0" encoding="UTF-8"><header/><body><code><body/>
Anyone know what to do?
I want to show the time of the last blog update at the header of my wordpress blog. It's not the last update time of a post but rather any post or page (i.e. any last update done in the blog)
e.g. Format:
Tuesday, March 16, 2010 Last Update: 6:09 PM ET
Is there any template tag to accomplish this?
I saw this in some header file in the framework directory:
@interface NSCharacterSet : NSObject <NSCopying, NSMutableCopying, NSCoding>
@end
@interface NSMutableCharacterSet : NSCharacterSet <NSCopying, NSMutableCopying>
@end
I thought protocols were inheritable.If I am right about that,There is no need to type <NSCopying, NSMutableCopying> again after "NSMutableCharacterSet : NSCharacterSet".And NSMutableCharacterSet also conforms to NSCoding protocol, right?
Than why is Apple typing that again?Am I making mistake?
I am using wordpress as a full on CMS on a site I am building. One thing I cant seem to figure out is how to link up my navigation bar to the pages I am creating in wordpress. I am using a sprite image hover navbar that is defined in the header.php file.
Does anyone have any idea how I can take a typical CSS sprite navbar and link it up with the pages I am creating within wordpress?
It's springed from this answer:
http://superuser.com/questions/129741/how-does-search-engines-update-indexing-so-soon/129743#129743
BTW,for the servers that's polled,is it the same whether the request is just for polling(header information) or complete web page?
I'm writing code in native C++ (not C++/CLR). I know that there is no built-in support for C++ with regards to the snippet manager and snipper picker interfaces, however I found a utility called "snippy" which supposedly can generate C++ snippets. Here is a c++ snippet that the program generated:
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>MySnippet</Title>
<Shortcut>MySnippet</Shortcut>
<Description>Just a test snippet</Description>
<Author>Me</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal Editable="true">
<ID>literal1</ID>
<ToolTip>just a placeholder</ToolTip>
<Default>
</Default>
<Function>
</Function>
</Literal>
</Declarations>
<Code Language="cpp"><![CDATA[cout << "$literal1$" << std::endl;]]></Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
If there is support in visual C++, even in a limited capacity, for C++ snippets, how do I add them to my environment, and what are the limitations? All I need is support for basic expansion snippets that I can invoke by typing a shortcut and hitting tab, and which supports basic literals that I can tab through (basically, if it supports the above snippet, I'm good). If this can't be done, are there any free add-ons or extensions to visual studio that support snippets for C++? I'm using both visual studio 2010 and 2008, but I mostly write code in 2010 right now.
This should be a code igniter based class,
The table header should be
Price Percent_change Company Name Company Code Volume
Please help any one knows?
Many thanks!
I've created a code to change a password. Now it seem contain an error. When I fill in the form to change password, and click save the error message:
Warning: mysql_real_escape_string() expects parameter 2 to be resource, null given in C:\Program Files\xampp\htdocs\e-Complaint(FYP)\userChangePass.php on line 103
Warning: mysql_real_escape_string() expects parameter 2 to be resource, null given in C:\Program Files\xampp\htdocs\e-Complaint(FYP)\userChangePass.php on line 103
I really don’t know what the error message means. Please guys. Help me fix it.
Here's is the code:
<?php session_start(); ?>
<?php # change password.php
//set the page title and include the html header.
$page_title = 'Change Your Password';
//include('templates/header.inc');
if(isset($_POST['submit'])){//handle the form
require_once('connectioncomplaint.php');//connect to the db.
//include "connectioncomplaint.php";
//create a function for escaping the data.
function escape_data($data){
global $dbc;//need the connection.
if(ini_get('magic_quotes_gpc')){
$data=stripslashes($data);
}
return mysql_real_escape_string($data, $dbc);
}//end function
$message=NULL;//create the empty new variable.
//check for a username
if(empty($_POST['userid'])){
$u=FALSE;
$message .='<p> You forgot enter your userid!</p>';
}else{
$u=escape_data($_POST['userid']);
}
//check for existing password
if(empty($_POST['password'])){
$p=FALSE;
$message .='<p>You forgot to enter your existing password!</p>';
}else{
$p=escape_data($_POST['password']);
}
//check for a password and match againts the comfirmed password.
if(empty($_POST['password1'])) {
$np=FALSE;
$message .='<p> you forgot to enter your new password!</p>';
}else{
if($_POST['password1'] == $_POST['password2']){
$np=escape_data($_POST['password1']);
}else{
$np=FALSE;
$message .='<p> your new password did not match the confirmed new password!</p>';
}
}
if($u && $p && $np){//if everything's ok.
$query="SELECT userid FROM access WHERE (userid='$u' AND password=PASSWORD('$p'))";
$result=@mysql_query($query);
$num=mysql_num_rows($result);
if($num == 1){
$row=mysql_fetch_array($result, MYSQL_NUM);
//make the query
$query="UPDATE access SET password=PASSWORD('$np') WHERE userid=$row[0]";
$result=@mysql_query($query);//run the query.
if(mysql_affected_rows() == 1) {//if it run ok.
//send an email,if desired.
echo '<p><b>your password has been changed.</b></p>';
include('templates/footer.inc');//include the HTML footer.
exit();//quit the script.
}else{//if it did not run OK.
$message= '<p>Your password could not be change due to a system error.We apolpgize for any inconvenience.</p><p>' .mysql_error() .'</p>';
}
}else{
$message= '<p> Your username and password do not match our records.</p>';
}
mysql_close();//close the database connection.
}else{
$message .='<p>Please try again.</p>';
}
}//end oh=f the submit conditional.
//print the error message if there is one.
if(isset($message)){
echo'<font color="red">' , $message, '</font>';
}
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<body>
<script language="JavaScript1.2">mmLoadMenus();</script>
<table width="604" height="599" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="130" colspan="7"><img src="images/banner(E-Complaint)-.jpg" width="759" height="130" /></td>
</tr>
<tr>
<td width="100" height="30" bgcolor="#ABD519"></td>
<td width="100" bgcolor="#ABD519"></td>
<td width="100" bgcolor="#ABD519"></td>
<td width="100" bgcolor="#ABD519"></td>
<td width="100" bgcolor="#ABD519"></td>
<td width="160" bgcolor="#ABD519">
<?php include "header.php"; ?> </td>
</tr>
<tr>
<td colspan="7" bgcolor="#FFFFFF">
<fieldset><legend> Enter your information in the form below:</legend>
<p><b>User ID:</b> <input type="text" name="username" size="10" maxlength="20" value="<?php if(isset($_POST['userid'])) echo $_POST['userid']; ?>" /></p>
<p><b>Current Password:</b> <input type="password" name="password" size="20" maxlength="20" /></p>
<p><b>New Password:</b> <input type="password" name="password1" size="20" maxlength="20" /></p>
<p><b>Confirm New Password:</b> <input type="password" name="password2" size="20" maxlength="20" /></p>
</fieldset>
<div align="center"> <input type="submit" name="submit" value="Change My Password" /></div>
</form><!--End Form-->
</td>
</tr>
</table>
</body>
</html>
A "traditional" C++ class (just some random declarations) might resemble the following:
class Foo
{
public:
Foo();
explicit Foo(const std::string&);
~Foo();
enum FooState
{
Idle, Busy, Unknown
};
FooState GetState() const;
bool GetBar() const;
void SetBaz(int);
private:
struct FooPartialImpl;
void HelperFunction1();
void HelperFunction2();
void HelperFunction3();
FooPartialImpl* m_impl; // smart ptr
FooState m_state;
bool m_bar;
int m_baz;
};
I always found this type of access level specification ugly and difficult to follow if the original programmer didn't organize his "access regions" neatly.
Taking a look at the same snippet in a Java/C# style, we get:
class Foo
{
public: Foo();
public: explicit Foo(const std::string&);
public: ~Foo();
public: enum FooState
{
Idle, Busy, Unknown
};
public: FooState GetState() const;
public: bool GetBar() const;
public: void SetBaz(int);
private: struct FooPartialImpl;
private: void HelperFunction1();
private: void HelperFunction2();
private: void HelperFunction3();
private: FooPartialImpl* m_impl; // smart ptr
private: FooState m_state;
private: bool m_bar;
private: int m_baz;
};
In my opinion, this is much easier to read in a header because the access specifier is right next to the target, and not a bunch of lines away. I found this especially true when working with header-only template code that wasn't separated into the usual "*.hpp/*.inl" pair. In that scenario, the size of the function implementations overpowered this small but important information.
My question is simple and stems from the fact that I've never seen anyone else actively do this in their C++ code.
Assuming that I don't have a "Class View" capable IDE, are there any obvious drawbacks to using this level of verbosity?
Any other style recommendations are welcome!