i have done Des encryption which requires 64 bit key .the main problem is that when i insert any 64 bit key it decrypted .(the key used in encryption and the key for decryption is not same).
Hi, I'm trying to learn java from bottom up, and I got this great book to read http://www.amazon.com/o/ASIN/0071591060/ca0cc-20 . Now I found example in the book about declaring Enums inside a class but outside any methods so I gave it a shot :
Enum CoffeeSize { BIG, HUGE, OVERWHELMING };
In the book its spelled enum and I get this compile message Syntax error, insert ";" to complete BlockStatements
Are the Enums that important at all?I mean should I skip it or its possible that I will be using those some day?
Hello,
I'm trying to copy the contents of one table into another in Postgres, however it appears some rows aren't being copied correctly:
ActiveRecord::StatementInvalid:
PGError: ERROR: column "email_date" is
of type timestamp without time zone
but expression is of type character
varying HINT: You will need to rewrite
or cast the expression.
Is there any way I can have it automatically skip (or ignore) invalid rows?
Here's the query I'm using:
SET statement_timeout = 0; INSERT INTO emails3 SELECT * FROM emails
I have used sqlite in c++, python and now (perhaps) in C#. In all of these i have no idea how to insert a blob into a table. How do i store and retrieve a blob in sqlite?
Hi all,
In considering several possible solutions to a recent task, I found myself considering how to get a php file that includes it's own MD5 hash. I ended up doing something else, but the question stayed with me.
Something along the lines of:
<?php
echo("Hello, my MD5 is [MD5 OF THIS FILE HERE]");
?>
Whatever placeholder you have in the file, the second you take its MD5 and insert it, you've changed it.
Hi,
I'm looking for a way to add a new custom menu item to the SMS interface. The idea is add an option like "Insert predefined message", and control the predefined message from other application.
Is this possible?
i am here to ask for help again, i created one database for all activities,
the problem i have is that the insertion in every activity comes in with new row, but that's
not what i want, what i am looking for is in the same row in each activity insert the columns
that contains. i already looked for solution here, they are speaking about static reference
but i don't know how to do it! so, is there any ideas ?
static DBAdapter db = new DBAdapter();
When I run some php code I've written, I get the following message:
You have an error in your SQL syntax;
check the manual that corresponds to
your MySQL server version for the
right syntax to use near 'condition,
price, name, email) VALUES('Fake
Title', 'Fake Subhead', 'Fake Author'
at line 1
I do not see anything wrong with my syntax, however, which is like:
mysql_query("INSERT INTO table (x1, x2, x3) VALUES('$y1', '$y2', '$y3')");
Any ideas?
i do export of an tablespace. This tablespace contains table1 with two rows say rowa and rowb/
now i delete rowb and insert new rowc into this tablespace.
Now i do import of this tablespace.
after importing i see the table1 in tablespace contains
rowa, rowb,rowc but it was suppose to contain rowa and rowb.
Can anybody tell why is this happening so?
I was wondering if the code below is the correct way to use mysqli_real_escape_string() when storing users data in a database.
Here is the PHP & MySQL code.
if (mysqli_num_rows($dbc) == 0) {
$mysqli = mysqli_connect("localhost", "root", "", "sitename");
$dbc = mysqli_query($mysqli,"INSERT INTO info (user_id, url)
VALUES ('$user_id', 'mysqli_real_escape_string($url)')");
}
if ($dbc == TRUE) {
$dbc = mysqli_query($mysqli,"UPDATE info
SET url = 'mysqli_real_escape_string($url)'
WHERE user_id = '$user_id'");
I have select, insert, update and delete query.
If I have to write all queries in the same stored procedure that is good for performance or should I write all queries in separate stored procedures?
I have the following entity model
public class Employee
{
public int Employee ID{get;set;}
public string employeename{get;set;}
public datetime employeeDOb{get;set;}
public datetime? employeeDateOfJoin{get;set;}
public string empFamilyname{get;set;}
public datetime empFamilyDob{get;set;}
}
here I have to design a view for collecting employee information and employee family information.
Since I am working on already available data, where in empFamilyDob was not mandatory.
But now it is being made mandatory, the previous data doesn't contain EmpFamilyDob.
So naturally I have added this new property EmpFamilyDob to the Model and made it required through DataAnnotations.
Now there are two set of views to be developed.
1. A view which simply allows to collect the employee information without employee family information. i.e, empFamilyName and EmpFamilyDob.--This view is used by the Hr section to insert empplyee details
Since the empFamilyname and EmpFamilyDob being now made mandatory, some other section will edit the data and update the EmpFamilyName and EmpFamilyDob as and when the information about employee family details are received.
I have action controller for CreateNew and Edit Which is being generated by using the default model.
There are two user actions being performed.
1.When the user clicks the Create new -- he will be able to update only the Employee information
2.As and when the other section receives the employee family details they update the familyname and family date of birth. i.e, EmployeeFamilyname and EmployeFamilyDob.
While creating new record the uses should be able to update employee information only and while editing the information he should be able to update the employeefamily information. Since I have a single view with most of these fields as required and not allowing null , How can I achieve this in a sincle view?
I have recorrected the model like this
public class Employee
{
public int Employee ID{get;set;}
public string employeename{get;set;}
public datetime employeeDOb{get;set;}
public datetime? employeeDateOfJoin{get;set;}
public string empFamilyname{get;set;}
public datetime? empFamilyDob{get;set;}
}
Now by default I hope the createnew action would insert null value for empFamilyname(string datatype) and empFamilyDob . In the Edit action the user should be made to enter empFamilyname and empFamilyDob(mandatory). As there is every chance that the user might edit other information about the employee(like employeeDob) I don't want to go for partial views. Can you help me out with some illustration. Thanks in advance
hello
whatever i append to $('click_filter1') it shows the error ... is not a function (for show(), hide(), toggle())
if i insert an alert, the alert gets executed, so the framework is init ok
the element with the id exists for sure
what can be the problem of this? why iam getting this error?
$('click_filter1').addEvent('click', function() {
$('click_filter1').show();
}.bind(this));
Is there a keyboard shortcut for pasting the content of the clipboard into a command prompt window on Windows XP (instead of using the right mouse button)?
The typical Shift+Insert does not seem to work here.
I know the question has no practical value, but it is interesting why in some languages semicolons and {} blocks are removed although their predecessor have them.
Actually it makes me nervous to write a code in Python as there are no ";" and {}.
Also in new language Google-GO semicolons are also missing although it says that lexer uses a rule to insert semicolons automatically as it scans.
So is there any secret :) reason for this.
Hi
Below ASP code have some error in 'Dim MonthNum=Month("Ctxtdatefrom") '
Can help to solve this.
......
If session("cmbLeaveType")=2 then
set rs2 = objconn.execute("select * form Particulars where empid='" & session("empid") & "'")
if ChildNationality = ABC then
Dim MonthNum=Month("Ctxtdatefrom")
Dim MonthNum2=Month("ctxtdateto")
If(MonthNum=5 and monthnum2=5)
if tdays1 then
else
set rs = objconn.execute("insert into leavebank (empid, datesubmit, datefrom, dateto....
END IF
END IF
END IF
END IF
I'm trying to create a table using PHP. What I need is a table with two columns.
So I have an SQL table with 4 fields - primary key id, language, word and definition. The language for each is either Arabic or Russian.
I want a table that does the following:
| defintion |
|____________________|
| |
| rus1 | arab1 |
| rus2 | arab2 |
| rus3 | arab3 |
| rus4 | |
So it divides the list by English word, creates a for each English word, then lists Russian equivalents in the left column and Arabic in the right. However there are often not the same number for both. What I am doing right now is running a WHILE loop in a WHILE loop. The outer loop is running fine but I think I am doing the inner loop wrong. Here is the bulk of the code:
$definitions=mysql_query("SELECT DISTINCT definition FROM words")
WHILE($row=mysql_fetch_array($definitions)
{
ECHO '<tr><th colspan="2">' . $row['definition'] . '</th></tr>';
$russian="SELECT * FROM words WHERE language='Russian' AND definition='".$row['definition']."'";
$arabic="SELECT * FROM words WHERE language='Arabic' AND definition='".$row['definition']."'";
WHILE($rus=mysql_fetch_array($russian) or $arb=mysql_fetch_array($arabic))
{
ECHO '<tr><td>'.$rus['word'].'</td><td>'.$arb['word'].'</td></tr>';
}
}
Sadly I am getting soemthing like this:
| defintion |
|____________________|
| |
| rus1 | |
| rus2 | |
| rus3 | |
| rus4 | |
| | arab1 |
| | arab2 |
| | arab3 |
Not sure what other way I can do this? I tried changing the or to || thinking the different precedence would cause another outcome, but then I get ONLY the Russian column.
I'm out of ideas, you guys are my only hope!
(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete) {
NSLog(@"delet it");
// Delete the row from the data source.
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];
}
else if (editingStyle == UITableViewCellEditingStyleInsert) {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view.
}
}
why is this crashing my application
I have a large data file that is creatd from a shell script. Next script processes it by sorting and reading several times, that takes more than 14 hours, it is not viable.
I want to replace this long running script with a program, probably in JAVA, C, or COBOl, that can run on windows or on sun solaris. I have to read a group of records everytime, sort and process and write to the output sort file and at the same time insert into db2/sql tables.
Hi, How can I insert multiple figures each of them has a caption and label, without using minipage.
I wrote this code, but just there is one caption :(
\begin{figure}[htp]
\centering
\label{figur}\caption{equation...}
\begin{tabular}{cc}
% Requires \usepackage{graphicx}
\includegraphics[width=60mm]{explicit3185.eps}&
\includegraphics[width=60mm]{explicit3183.eps}\\
\includegraphics[width=60mm]{explicit1501.eps}&
\includegraphics[width=60mm]{explicit23185.eps}\\
\includegraphics[width=60mm]{explicit23183.eps}&
\includegraphics[width=60mm]{explicit21501.eps}\\
\end{tabular}
\end{figure}
In C++, why does string::find return size_type and not an iterator?
It would make sense because functions like string::replace or string::insert take iterators as input, so you could find some character and immediately pass the returned iterator to replace, etc.
Also, std::find returns an iterator -- why is std::string::find different?
I have a huge table that is mainly used for backup and administrative purposes. The only records that matters is the last inserted record.
On every hit to order by time inserted is just too slow. I want keep a separate table with the last inserted id.
In PHP I now insert, get last inserted id, and update the other table.
Is there a more efficient way to do this.