using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IronPython;
using IronPython.Hosting;
namespace EmbeddedIP2_6
{
class Program
{
static void Main(string[] args)
{
var engine = Python.CreateEngine();
var ss = engine.CreateScriptSourceFromString("B"...
I am looking for an efficient way to solve the following problem.
List 1 is a list of records that are identified by a primitive triplet:
X | Y | Z
List 2 is a list of records that are identified by three sets. One Xs, one Ys, one Zs. The X, Y, Zs are of the same 'type' as those in list one so are directly comparable with one another...
My SQL Compact database is very simple, with just three tables and a single index on one of the tables (the table with 200k rows; the other two have less than a hundred each).
The first time the .sdf file is used by my Compact Framework application on the target Windows Mobile device, the system hangs for well over a minute while "some...
Greetings gurus,
I need a database solution that satisfies:
1: Custom-formated output from queries.
2: Custom functions integrated into queries.
Some implementations of XQuery with update facility might suite my needs.
However, I'm unsure of their performance when it comes to thousands (and maybe millions) of records of various nesting...
I have a master-detail display in a single Silverlight view. The master is a DataGrid of partially populated items. When I select an item in the DataGrid, my service returns a fully populated data object, which is rendered in the Detail view.
This causes a problem when the user scrolls the data grid with the keyboard cursor keys because...
I don't know what data structure to use for this problem. I want the structure to have:
Constant time insertion or deletion.
Constant time retrieval by id.
The actual system is:
I've got a bunch of objects each with a unique id. My program will need to receive requests for an id and return the relevant object.
Whenever it receives...
I've read that it is better to place your <script> tags at the end of the document. The argument for doing this appears to be that the browser will stall rendering the page below a script tag until it has loaded and and executed the script. If your script tag is at the top of the page, rendering is stalled for a while, which is bad.
How...
In a C# to native lib CLI/C++ wrapper, I have a choice:
Store native pointer in a managed class (native object is created using native "new")
or
Store native object as a data blob in a managed class' field, and use pin_ptr to pin it before each native use.
Has anyone done any comparative analysis on the relative performance costs...
I have designed databases several times in my company. To increase the performance of the database, I look for Normalisation and Indexing only.
If you were asked to increase the performance of a database which has approx 250 tables and some tables with millions of records, what different things you would look for?
Thanks in advance.
...
First, I know that the sql statement to update table_a using values from table_b is in the form of:
Oracle:
UPDATE table_a
SET (col1, col2) = (SELECT cola, colb
FROM table_b
WHERE table_a.key = table_b.key)
WHERE EXISTS (SELECT *
FROM table_b
WHERE ta...
Let's say I need to issue a number of queries against a relational database, which of the following would be better from performance perspective:
Issue them one by one, being able to use data from the first ones as input in the secondary ones (meaning multiple connections made, but less joins/subselects).
Batch the commands together (m...
Hi, All,
First, I am sorry for this rough question, but I don't want to introduce too much details, so I just ask for related resource like articles, libraries or tips.
My program need to do intensive computation of ray-triangle intersection (there are millions of rays and triangles), and my goal is to make it as fast as I can.
What I...
I would like to be able to calculate the amount of time a number of functions take to execute. I was thinking about using some type of stopwatch class. I can call start/stop before and after each function call, however that seems horribly ugly to me. Is there a way to do this without a stopwatch class? Can something in the Reflections c...
Hi,
Wanted to know which is the most lightest HTML element. Have a huge set of JSON data which i have to display in proper readable format, hence going to loop through the data and create dynamic elements.
Which is the most lightest element of HTML, lightest as in which takes the least amount of memory and is easily rendered by the bro...
Somewhat strange problem... when I start my .NET app for the first time after rebooting my machine, the SQL Server queries are really slow... when I pause the debugger, I notice that it's hanging on getting the response from the query. This only happens when connecting to a remote SQL server (2008)... if I connect to one on my local mac...
Say we want to compile a large project (say GCC or the Linux kernel) as fast as possible. Does a CPU with hyperthreading capability (say an Intel Core i7) run the compiler any faster with hyperthreading enabled or disabled? Are there any published benchmarks that test this?
My understanding of hyperthreading is that each core can select...
Hi,
What is the fastest way to store config data in PHP so that it is easily changeable (via PHP)? First I thought about having config.php file, but I can't edit it on fly with PHP, at least not very simply? Then I thought about having XML files, but parsing them for each HTTP request is overwhelming. So, I thought about INI files, but ...
I'm biased towards writing fool-proof applications. For example with PHP site, I validate all the inputs from client-side using JS. On the server-side I validate again. On both sides I do validation for emptiness, and other patterns (email, phone, url, number, etc). And then I strip malicious tags or characters, trim them (server-side). ...
Hi all,
I have an iPhone app (Objective C++). My beta testers - some of them, not all of them - are complaining of slow startup, 7 to 10 seconds. On my device (it's a 3GS), it loads in about 2 sec. On the device simulator - even faster. As things stand now, I cannot even isolate the bottleneck.
Can I somehow slow down the simulator or ...
Which is better to use when I use _GET['something here'] for a variable to check if it is empty or not
if (isset($_GET['url']) != '') {
//do stuff with it
}
OR
if (isset($_GET['url']) != NULL) {
//do stuff with it
}
'' or null or something else?
Please don't call this over optimizing or micro optimizing, I am simply lookin...