I have an editable datagrid, whenever I make a change it automatically gets saved. How can I disable this? So the changes gets saved only when I click on an external save button.
Hi,
I've Motorola Symbol Handheld Model MC3090 (from symbol MC3000 series), having Windows CE 5.0.
Is it possible that i can upgrade the Handheld OS from CE 5.0 to CE 6.0?
I am using the REPLACE function in oracle to replace values in my string like;
SELECT REPLACE('THE NEW VALUE IS #VAL1#','#VAL1#','55') from dual
So this is OK to replace one value, but what about 20+, should I use 20+ REPLACE function or is there a more practical solution.
All ideas are welcome.
Hi,
I use:
<%= select( "payment", "id", { "Visa" => "1", "Mastercard" => "2"}) %>
and I get this in HTML
<select id="payment_id" name="payment[id]"><option value="2">Mastercard</option>
<option value="1">Visa</option></select>
now how can I read the payment[id] with params[], if I use params[payment[id]] I get an error.
I am using MPXJ library to access Microsoft Project file in .net. before proceeding with it i wanted to make sure either it is based on Microsoft Interop services or not.
i hope not :)
I am looking for some algorithm/library to get functionality like microsoft project caters for scheduling tasks dates as if we change any task date then its parent, predecessors and successors dates get effected.
is there any help i can get... in any way..
Thanks,
Hi
I need some advice regarding multiple records. I have a table with fields username,*message* and message_to. the scenario could be of sending same message to multiple users in a go. What do you suggest? will it be efficient to save all recipients in a single column with comma separated values or I add multiple entries ?
Thanks
/A
I have windows forms application with multiple forms and controls in them. I want if user has selected some text in any control of any form of my application and click on cut/copy/paste button on toolbar operation get performed accordingly.
i m using C#.net's sendkeys.send("^c") on click of copy button but it doesn't work...
OR any 1 can tell if is there any way to get selected text (despite of knowing, which form/control of my application).
Thanks in advance...
The following codes goes through all directories and sub-directories and outputs just .java files;
import java.io.File;
public class DirectoryReader {
private static String extension = "none";
private static String fileName;
public static void main(String[] args ){
String dir = "C:/tmp";
File aFile = new File(dir);
ReadDirectory(aFile);
}
private static void ReadDirectory(File aFile) {
File[] listOfFiles = aFile.listFiles();
if (aFile.isDirectory()) {
listOfFiles = aFile.listFiles();
if(listOfFiles!=null) {
for(int i=0; i < listOfFiles.length; i++ ) {
if (listOfFiles[i].isFile()) {
fileName = listOfFiles[i].toString();
int dotPos = fileName.lastIndexOf(".");
if (dotPos > 0) {
extension = fileName.substring(dotPos);
}
if (extension.equals(".java")) {
System.out.println("FILE:" + listOfFiles[i] );
}
}
if(listOfFiles[i].isDirectory()) {
ReadDirectory(listOfFiles[i]);
}
}
}
}
}
}
Is this efficient? What could be done to increase the speed?
All ideas are welcome.
Hello,
I have a field in my DB that holds value separated by commas like;
$tmp_list = "COB,ISJ,NSJ,"
Now when I fetch that the row, I would like to have them in an array.
I have used array($tmp_list) but I get the values in one line only like:
[0] => 'COB,ISJ,NSJ,'
instead of
[0] => 'COB',
[1] => 'ISJ',
[2] => 'NSJ'
All help is appriciated.
I would like to perform checking on the following:
VALID LINES;
/**/ some code
*/ some code /** dsfsdkf sd**/
NOT VALID LINES;
/**/ //some code
*/ /***/ //somecode
So basically if there is a line of code outside a comment it is valid, otherwise not.
What would be the best way to tackle this kind of validation?
Note:
For */ I assume that the /* has been opened some lines before.
Hello all ,
What are the techniques used to write an embedded C software which has multi features. Features can be configurable for multi-hardware platform.
I have developed a firmware based on a RTOS for ARM7. Now i want to make it a baseline firmware which can be used with similar, more or less features (configurable) on different microcontrollers, like MSP, or AVR etc.
Being more specific, if i want to change different features of firmware for one hardware and others for the second. What technique should i adopt and is there any study material available.
Regards
i've a table c_const
code | nvalue
--------------
1 | 10000
2 | 20000
and i've another table t_anytable
rec_id | s_id | n_code
---------------------
2 | x | 1
now i want to calculate the x value with computed column, based on
rec_id*(select nvalue from c_const where code=ncode)
but i get error "Subqueries are not allowed in this context. Only scalar expressions are allowed."
how can i calculate the value in this computed column ?
thanks.
Hello,
I am creating a counter for unique number of visits on a post, so what I have until now is a table for storing data like this;
cvp_post_id | cvp_ip | cvp_user_id
In cases a registered user visits a post, for the first time a record is inserted with cpv_post_id and cvp_user_id, so for his next visit I query the table and if the record is available I do not count him as a new visitor.
In cases of an anonymous user the same happens but now the cvp_ip and cpv_post_id are used.
My concerns is that I do a query every time anyone visits a post for checking if there has been a visit, what would be a more effective way for doing this?
OpenID providers like GOogle,Yahoo etc also stroes user info like Name,email etc. Is it possible to retrieve it by using OpenID Selector(http://code.google.com/p/openid-selector/)? If yes then how do I fetch it? is the OpenID URL same every time when a user logs in? if yes ten may I store that handler in DB?
I am using PHP.
I have implemented the delegates for UITextField and also method for these text field. Below are the methods:
- (void)textFieldDidBeginEditing:(UITextField *)textField
{
[textField resignFirstResponder];
}
- (BOOL)textFieldShouldReturn:(UITextField *)aTextField
{
[aTextField resignFirstResponder];
return YES;
}
My problem is that when I want to enter text into UITextField its delegate does not allow me to enter the text into textfields. Kindly tell me how i can enter the data into textfields
i tried something like this but the id value is not changing, getting the value for first record and set the value for all rest...
insert into table1 (Id,b,c,d)
(select (select max(Id)+1 from table1),x,y,z from table2 where... )
Dear,
I am looking for well known Microsoft Project alike applications which somehow i get to know through this http://stackoverflow.com/questions/729926/alternatives-to-microsoft-project but I also need to know their API/Library through which I can pro grammatically read their files using .NET
Hope m not asking for much :)
Hello,
I have a the following table with rows:
================================================================
id | name | group1 | group2 | group3 | group4 |
================================================================
1 | Bob | 1 | 0 | 0 | 1|
================================================================
2 | Eric| 0 | 1 | 0 | 1|
================================================================
3 | Muris | 1 | 0 | 1 | 1|
================================================================
4 | Angela | 0 | 0 | 0 | 1|
================================================================
What would be the most efficient way to get the list with ActiveRecords ordered by groups and show their count like this:
group1 (2)
group2 (1)
group3 (1)
group4 (4)
All help is appreciated.
Hello,
I have a table with users:
name | country |
.. | UK |
.. | US |
.. | US |
.. | UK |
.. | FR |
.. | FR |
.. | UK |
.. | UK |
.. | DE |
.. | DE |
.. | UK |
.. | CA |
.
.
What is the most efficient way with ActiveRecords to get the list of countries in my view and for each country how many users are from, so:
US 123
UK 54
DE 33
.
.
.
Hello,
I am looking for the fastest way to remove duplicate values in a string separated by commas.
So my string looks like this;
$str = 'one,two,one,five,seven,bag,tea';
I can do it be exploding the string to values and then compare, but I think it will be slow. what about preg_replace() will it be faster? Any one did it using this function?