Is it possible to work with an encrypted SQLite database directly in Qt? Or, do I have to read it entirely into memory, decrypt in memory, do work, encrypt in memory, write to disk?
With jquery it's very easy to insert some element inside another element using the selector technology, I am wondering if there is any python library that can do things similar with jquery, the reason is I want server side python program to produce the static pages, which needs to parse the html and insert something into it.
Or other alternative, not in python language at all?
EDIT: To be clear, I want to use python to write below program:
h = html.parse('temp.html')
h.find('#idnum').html('<b>my html generated</b>')
h.close()
Currently we use log4net and create a new folder (usually below C:) with write and create access rights for the worker process user. Is there perhaps a standard windows folder we should or could be using such as LOCALAPPDATA? I'm guessing that LOCALAPPDATA is a bad choice in the general case because IIS users tend to be non-interactive users and thus I don't think they have the usual user folder structrues available.
I am trying to do a simple subquery join in Microsoft Query, but I cannot figure out the syntax. I also cannot find any documentation for the syntax.
How would I write the following query in Microsoft Query?
SELECT *
FROM (
SELECT Col1, Col2
FROM `C:\Book1.xlsx`.`Sheet1$`
) AS a
JOIN (
SELECT Col1, Col3
FROM `C:\Book1.xlsx`.`Sheet1$`
) AS b
ON a.Col1 = b.Col1
Is there official documentation for Microsoft Query?
Thanks!
I am trying to write a .sh file that runs many programs simultaneously
I tried this
prog1
prog2
But that runs prog1 then waits until prog1 ends and then starts prog2...
So how can I run them in parallel?
Thanks
I need to match and replace some comments.
for example:
$test = "the url is http://www.google.com";// comment "<-- that quote needs to be matched
I want to match the comments outside of the quotes, and replace any "'s in the comments with "'s.
I have tried a number of patterns and different ways of running them but with no luck.
The regex will be run with javascript to match php "//" comments
UPDATE:
I took the regex from borkweb below and modified it. used a function from http://ejohn.org/blog/search-and-dont-replace/ and came up with this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
function t_replace(data){
var q = {}, ret = "";
data.replace(/(?:((["'\/]*(("[^"]*")|('[^']*'))?[\s]*)?[\/\/|#][^"|^']*))/g, function(value){
q[key] = value;
});
for ( var key in q ){
ret = q[key];
}
var text = data.split(ret);
var out = ret + text[1];
out = out.replace(/"/g,""");
out = out.replace(/'/g,"'");
return text[0] + out;
}
</script>
</head>
<body>
<script type="text/javascript">
document.write(t_replace("$test = \"the url is http://www.google.com\";// c'o\"mment \"\"\"<-- that quote needs to be matched")+"<br>");
document.write(t_replace("$test = 'the url is http://www.google.com';# c'o\"mment \"\"\"<-- that quote needs to be matched"));
</script>
</body>
</html>
it handles all the line comments outside of single or double quotes. Is there anyway I could optimize this function?
Which in C# compiled for x64 is faster?
a. int * int;
b. if(int < 0) int = -int;
c. Math.Abs(int)
I need pure theoretical answer. Please do not tell me to write loop and measure it with stopwatch.
Thanks
Hi,
I have a project in C# with a Sql-server Database.
In that database I have a table named 'Process' and columns named 'process_name', 'Full_Name' and 'Version' (all of the type:nvarchar(50)).
I want to write a query wich will add the new process, only if it doesn't exist in the table yet.
How can I do that?
Many thanks,
Let's say I have the following class:
class Person(val firstName:String, val lastName:String)
Is there an automatic way to generate xml from this class without having to hand create a toXml() method? Ideally the output would be something like:
<Person
<firstNameJohn</firstName
<lastNameSmith</lastName
</Person
It seems like there should be a way to do this without having to write all that out manually. Perhaps there is a trait I haven't found yet?
I am trying to create a piece of software that can be used to create VERY large (10000x10000) sized bitmaps. All I need is something that can work in monochrome, since the required output is a matrix containing details of black and white pixels in the bitmap. The closest thing I can think of is a font editor, but the size is a problem.
Is there any library out there that I can use to create the software, or will I have to write the whole thing from the start?
Hi all;
i want to write head tag.
i need create dynamic
<head id="htmlHead" runat="server">
</head>
code behind:
htmlHead.InnerText = "<script src=\"Scripts/jquery.ui.datepicker.js\" type=\"text/javascript\"></script>"
not work pls help
I am an ASP.NET developer, but now I want to build a software that can be installed on my PC. Software built in .NET platform only works when the .NET Framework is installed, and software written in Java only works if the JDK is installed. When I install programs like Firefox, uTorrent, etc., I don't need to have any frameworks (.NET, JDK, etc.) installed. How do I write software that doesn't depend on a framework?
Hi,
In my asp.net page, i am refring external javascript file.
As per my learning in web, it's recommended that always put inline java script at the bottom of page. There is no information i get about external javascript refrence
I want to know that if i am refing external javascript file then where should i write?
Inside top of the page
bottom after closing tag of
I'm building an ASP.Net MVC project in TeamCity.
Can I somehow call the Publish target and get the output copied to a folder under IIS? or do I need to write an msbuild script for this?
I've been working through Practical Common Lisp and as an exercise decided to write a macro to determine if a number is a multiple of another number:
(defmacro multp (value factor)
`(= (rem ,value ,factor) 0))
so that :
(multp 40 10)
evaluates to true whilst
(multp 40 13)
does not
The question is does this macro leak in some way? Also is this "good" Lisp? Is there already an existing function/macro that I could have used?
I am trying to program according to Behavior Driven Development,
which states that no line of code should be written without writing
failing unit test first.
My question is, how to use BDD with private methods?
How can I unit test private methods?
Is there better solution than:
- making private methods public first and then making them private
when I write public method that uses those private methods;
or
- in C# making all private methods internal and using InternalsVisibleTo
attribute.
Robert
Like, if I write a program on windows using C# and the .NET framework, then drop the code on a Linux machine running mono, will it run exactly the same? Or would I have to rewrite it to work with Mono's libraries?
I am using mod_rewrite to remap the URLs in my website in the following format:
http://www.mydomain.com/health/54856
http://www.mydomain.com/economy/strategy/911025/
http://www.mydomain.com/tags/obama/new
The problem is that I am making AJAX calls to a file: http://www.mydomain.com/login.php
And I don't want to write the FULL url or even use the ../ trick because there isn't a fixed level of folders.
So, what i want is something to access the login.php from the root, whatever the domain name is:
$.ajax({
type: "POST",
url: "http://www.mydomain.com/login.php"
});
Can anyone with an example help me to create an Asp.Net MVC model as a WCF Service where i can write my entity class, which can be used in my controller to create view
Good day, colleagues!
Tell me please, how to make a dynamic xpath-parsing:
for example, instead of writing $domXPath-query('//[(@id = "article-id-18")]');
- write something like that $domXPath-query('//[(@id = "article-id-*")]');, because in my case, the site's script generate (every time) a new id for block, that contains article's text?
So question, is above.
Hi,
In my application I download several critical files from a server, and I want to write some code that handles the case where the a file download didn't complete for a reason or other ,to retry downloading it at next startup. The function that downloads a file at a time however throws only MalformedURLException and IOException , but if these exceptions are thrown that means that the download didn't even begin. How should I arrange things so I can treat the case where a download failed , even if it began ?
download(String file) throws MalformedURLException ,IOException
{
}
Write a function which takes a string argument, and creates and returns an Employee object containing details of the employee specified by the string. The string should be assumed to have the format
12345 25000 Consultant Bart Simpson
The first three items in the line will be the payroll number, salary and job title and the rest of the line will be the name. There will be no spaces in the job title but there may be one or more spaces in the name.
My function:
def __str__(self):
return format(self.payroll, "d") + format(self.salary, "d") + ' ' \
+ self.jobtitle + self.name
I'm trying to write some software to read a MIDI file into an internal data format and use it to control 3D simulated instruments.
My biggest problem is reading the MIDI data in from a file, and I'd like to avoid writing all the import code.
Does anyone know of a free (preferably Open Source), cross-platform MIDI file reading library?
What features does it have?
Can it import other note-based music formats?