I want to replace the date found at the end of the "datadir" line with the current date.
For e.g. my my.cnf file looks like this...
# head /etc/my.cnf
[mysqld]
#mount -t tmpfs -o size=102m tmpfs /mnt
#datadir=/mnt
read-only
datadir=/mysqlApr5
#datadir=/mysqlApr2
#datadir=/mysqlMar16
#datadir=/mysqlFeb25a
Most of the lines are commented. I need…
Hello, I am writing a class. I have encountered the problem in the title.
Here is the code:
class delivery
{
private string strDeliveryName;
private string strDeliveryAddress;
private string strDeliveryDay;
private string strDeliveryTime;
private string strDeliveryMeal;
private string strDeliveryInstructions;
private…
I have two NSMutableString objects defined in my viewController's (a subclass of UITableViewController) .h file:
NSMutableString *firstName;
NSMutableString *lastName;
They are properties:
@property (nonatomic, retain) NSMutableString *firstName;
@property (nonatomic, retain) NSMutableString *lastName;
I synthesis them in the .m file.
In…
I recently used Adobe Acrobat Pro's OCR feature to process a Japanese kanji dictionary. The overall quality of the output is generally quite a bit better than I'd hoped, but word boundaries in the English portions of the text have often been lost. For example, here's one line from my file:
softening;weakening(ofthemarket)8 CHANGE [transform]…
Hello,
I am trying to write some mod_rewrite rules to generate thumbnails on the fly.
So when this url
example.com/media/myphoto.jpg?width=100&height=100
the script should rewrite it to
example.com/media/myphoto-100x100.jpg
and if the file exists on the disk it gets served by Apache and if it doesn't exist it is called a script to…
hi, can anybody help me solve this :
i got
$filename= "index 198.php";
i use this and failed
preg_match(" [a-zA-Z0-9]", $filename, $output);
what kind of regex pattern i have to use so the $output array will be consist a strongnumber only value.
I would like to change:
http://example.com/index.php?p=blog&pid=2&lid=1&l=en
into just
http:// example.com/en/blog.html
or just
http:// example.com/blog.html
thanks in advance!
Lets say we have some basic AR model.
class User < ActiveRecord::Base
attr_accessible :firstname, :lastname, :email
end
...
some_helper_method(attrib)
...
def
Now I would like to pass someuser.firstname to helper and I would like to get both the value and the attribute name, for example:
some_helper_method(someuser.firstname)…
Hi, I'm using rails 2.3 and I'm trying to compress (gzip) text that I'd like to save using ActiveRecord into a sqlite database.
However, the compressed text isn't being saved b/c I get this type of error: SQLite3::SQLException: unrecognized token: "'x##U?#7
Any thoughts on what I can do to avoid this error?
should I compress the text…
All of my methods are failing me in various ways.
different lighting can mess it all up too.
has anyone every trying to return a name given a rgb value? "red" "green" "blue" would be enough to satisfy my needs for today.
i have unsafe byte processing of images from my web cam.
I know there are already many questions like mine but I found no answer which works in Java. So I write a new question.
I have text files with content like this:
key1 = "This is a \"test\" text with escapes using '\\' characters";
key2 = 'It must work with \'single\' quotes and "double" quotes';
I need a regular expression which…
I have a script which creates a drag-and-drop uploader on the page from a div. My DIV will look something like
<div class="well uploader"
data-type="image"
data-callback="product.addimage"
data-multi="1"></div>
Then I'll have a function something like
var product = new function(){
/* Some random stuff…
Hey,
I have the following program, that is trying to upload a file (or files) to an image upload site, however I am struggling to find out how to parse the returned HTML to grab the direct link (contained in a ).
I have the code below:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import pycurl
import urllib
import urlparse
import…
Does anyone know of a c++ library for taking an image and performing image recognition on it such that it can find letters based on a given font and/or font height? Even one that doesn't let you select a font would be nice (eg: readLetters(Image image).
Hi All,
I have two nvarchar fields in database to store the DataType and DefaultValue,
I have a DataType Double and value as 65.89875 in english format.
Now I want the user to see the value as per the selected browser language format (65.89875 in English should be displayed as 65,89875 in german). Now if the user edits from…
So in my scrapy project I was able to isolate some particular fields, one of the field return something like:
[Rank Info] on 2013-06-27 14:26 Read 174 Times
which was selected by expression:
(//td[@class="show_content"]/text())[4]
I usually do post-processing to extract the datetime information, i.e., 2013-06-27 14:26…
So, I have an associative array and the keys in the array are properties of an object. I want to loop through the array and in each interation do something like this:
Object.key
This however does not work and results in returning undefined rather than the value of the property.
Is there a way to do this?
Thanks
Im using the Zend Lucene however Im have a little trouble. I wish to query the index for the exact tring so page_name IS test123, not any fuzzy match.
Currently I have:
$hits = $index->find('page_name:"test123"');
And advice appreciated, thanks!
column1
\\abc\tri\eds\rf1\edr\4ed
\\f.d\tri\ef\poe
\\ghi0j\tri\gf\rf\k\hg\ose
'
'
'
i got some rows like that in a column
now i want to get the result set like
\\abc\tri\eds
\\f.d\tri\ef\
\\ghij\tri\gf
simply from first '\' to end of 4th '\'
I have a readline-based application with a prompt, however I'd like it to not show when the input is not interactive.
$ ./readline-app < command-list > result
$ cat result
prompt> Output line 1
prompt> Output line 2
prompt>
$
How can I make the prompt to not print in this case?
I have an issue where I need to be able to have a compiled exe ( .net 3.5 c# ) that I will make copies of to distribute that will need to change a key for example before the exe is sent out.
I cannot compile each time a new exe is needed. This is a thin client that will be used as part of a registration process.
Is it…
Hello. I have a C# application in which a LOT of information is being added to a Textbox for display to the user. Upon processing of the data, almost immediately, the application becomes very slow and unresponsive. This is how I am currently attempting to handle this:
var saLines = textBox1.Lines;
var saNewLines =…