Questions

MySQL Error when dropping index (errno 150)

I've got problem with dropping foreign key index, I always get the same error ALTER TABLE `comments` DROP INDEX `id_user` which outputs 1025 - Error on rename of './postuj_cz1/#sql-d834_a0c704' to './postuj_cz1/comments' (errno: 150) The id_user on the other table is simple pr ...

Writing a Custom Code Example

  I have been stuck in a problem for a while now. I am trying to count the number of groups. I tried soo many things and nothing worked . Now I want to try to write a function that does the counting for me.   Can somebody write me an example of a cutom code  that can be called from expression. ...

How to do an Integer.parseInt() for a decimal number?

The Java code is as follows: String s = "0.01"; int i = Integer.parseInt(s); However this is throwing a NumberFormatException... What could be going wrong? ...

error in debugging vs.net2003 sp1 on IIS 7.0 Vista

  I can not start debugging on IIS 7.0 with VS.Net 2003 SP1. I got the error      "Error while trying to run project: Unable to start debugging on the web server. You do not have permission to debug the application. The URL for this project is in the Internet zone. Click help for more infor ...

Imposing constrains of template function types, without c++0x concepts

Now that we know that Concepts is not part of C++0x, I am looking for methods to impose restrictions on types in template functions. Here are two examples: If we want to make sure that a given type is an integer, we can use: template <class N> inline int f(const N n) { if (( ...

windows 2003 hosting

In Win2003, can a WCF service (http binding) be hosted in a Win32 /NT Service or is IIS always required for hosting whenever HTTP binding is involved?       ...

Rename context menu

Hi i am not sure wether or not this is the right place to put this or not but anyway,I was wondering if it would be possible to use C# to edit the Webbrowser context menu. I want to rename the "Open link in new window" button to " Open link in new tab" and then remove the "O ...

Javascript infamous Loop issue?

I've got the following code snippet. function addLinks () { for (var i=0, link; i<5; i++) { link = document.createElement("a"); link.innerHTML = "Link " + i; link.onclick = function () { alert(i); }; document.body.appendChild(l ...

Strongly Typed Datasets and NULLs

Does anyone know if the strongly typed datasets in VS2008 will NULLs properly in terms of databinding? For example, allowing Integer and Datetime columns to be NULLable. ...

Linq2SQL “or/and” operators (ANDed / ORed conditions)

Let's say we need to apply several conditions to select from a table called "Things" (unknown count and nature) if conditions are known, we can write db.Things.Where(t=>foo1 && foo2 || foo3); but if we have to build that Where condition programatically, I can imagine how c ...

LINQ and Visual Studio 2005 Framework 2.0

 I keep reading about LINQ working with Visual Studio 2005, but its a "preview"  I wanted to know if certain parts of it are left out, or is it almost the full product? ...

Continuous data handling through TCP

I need to handle continuous data through TCP and write it to database. I use the following code (suggested by ZZ Coder): <?php $fp = fsockopen ("192.168.0.179", 2323); if (!$fp) { die ("$errstr ($errno)"); } if ($fp) { $user="root"; $password="12345"; $databas ...

Fail-safe way of round-tripping JVM byte-code to text-representation and back

I'm looking for a fail-safe way to round-trip between a JVM class file and a text representation and back again. One strict requirement is that the resulting round-tripped JVM class file is exactly functionally equivalent to the original JVM class file as long as the text representation ...

Using .NET Framework 1.1 and VS.Net 2003 on MS Vista with IIS 6.0

 I could not find a right place to send this question because it is both about the framework itself and vs.net 2003 and ms vista. I am trying to imigrate to a new computer with ms vista installed from an old one that has xp on it. I got web projects that was created on .net framework 1.1. I configur ...

How to use `grep` as to choose lines with column > 1?

I get results like below from a pipeline in linux: 1 test1 1 test2 2 test3 1 test4 3 test5 1 test6 1 test7 How can I use grep to retrieve only the lines where the first column is > 1? ...

Referencing types in other assemblies

Can I reference EntityTypes in other assemblies ?   Related question :  Is there ussually only one edmx file per assembly ?   ...

How to override an existing extension method

I want to replace extension methods included in the .NET or ASP MVC framework by my own methods. Example public static string TextBox(this HtmlHelper htmlHelper, string name) { ... } Is it possible? I can't use the override or new keyword. ...

Add UIElement from Control to MainWindow Content

Hi,I'd like to know if it is possible to add some generated UIElements from a Control to the Content of the MainWindow Grid or to the Content of a Window Grid within the Application. Will be thankfull for any advise.Regards,Omid ...

Image alignment in text?

Using iTextSharp i'm trying to align an image so that it gets embedded in a paragraph. I can do it like this: iTextSharp.text.Image image; image.Alignment = Image.ALIGN_RIGHT | Image.TEXTWRAP; document.Add(image); document.Add(new Paragraph("Large string of text goes here")); But the ...

CRM has been very very slow..

Hello fellow users,Currently we are using CRM and integrating it with the Microsoft Outlook. However, CRM has been acting really slow these past days.. It takes time to just load the Group Calendar (SSYH product). It was so slow that most of the time we got the message "Connection Time Out" ...

RapidWeaver-like editor for windows

After seeing a friend using RapidWeaver and producing wonderful results in a few clicks, I was astonished and started searching if a tool like that exists for Windows. Unfortunately, so far my search yielded no result, so I'm writing here the criteria I'm using hoping that anybody will c ...

Reduce String length before conversion

Greetings Everyone,        As a NewBee, I'm still trying to get a handle of the language.        My question today, I'm reading back a long string of ASCII from a piece of equipment.  The data consists of 39 pieces of ASCII data that I'm converting to a number.  Below is a small portion of the c ...

Google maps api add marker strange behavior in IE8?

I was just playing around a bit with google maps and wanted to add a marker to the map after clicking somewhere. This works fine, except in IE8 (the locations don't show up where i click, but a bit to the left or the right.. can't see a pattern) This is the code: GEvent.add ...

ReplicatorActivity

Hello ,   what is difference between ReplicatorActivity  and  GroupConditionedActivity ?     and plz if anyone have agood example of replicator ..tell me ?     thanks all , hema ...

Copy Files from sub-folder of My Documents

Hello I am making a program that will copy a large number of small files from a sub-folder of My Documents, and paste them to another location.  When I was doing something like this with batch files I would put in C:\Documents and Settings\%USERNAME%\My Documents\Merger Tool\MFGs\ABC as the sourc ...

Arithmetic in ruby

Why this code 7.30 - 7.20 in ruby returns 0.0999999999999996, not 0.10? But if i'll write 7.30 - 7.16, for example, everything will be ok, i'll get 0.14. What the problem, and how can i solve it? ...

Integrating SQL Database into Application

I have added an SQL Database to a windows application (VB.NET 2005)  to let the user save information offline before connecting to the databse and uploading. All works fine on my development machine. However, after creating a setup program and installing it on a users machine I cannot connect to the ...

Storing database connections in session, in a small scale webapp

I have a j2ee webapp that's being used internally by ~20-30 people. There is no chance of significant growth in the number of users. From what I understood there's a trade-off between opening a new DB connection for each request made to the webapp (expensive, but doesn't block other us ...

Document Versioning Problem

  So here is the issue.  I'll run through what I did and we can go from there.  I create a new site collection with the Document Center Template. I upload "HelloWorld.doc."  It shows Version 0.1 as it should. I then check out the document to edit it and it increments the version to 0.2 on ...

Auto increase php numbers on different lines 0100, 0200 etc

Right now im running something based on time and including files. This is a long file and seems unnecessary. What I want to do is auto increment the times for the 24 times i call code. current style coding: if($time >= "0000" && $time < "0100") { include("1.php"); } elseif( ...

Hot Tags