15,898,991 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by K N R (Top 56 by date)
K N R
23-Jun-14 5:49am
View
var numbers="";
for (var index = 0; index < 8; index++) {
if (permissions.indexOf($.trim(names.split(',')[index])) == -1) {
if (numbers == "") {
numbers += index;
} else {
numbers += "," + index;
}
}
}
$('#tabname').tabs({ collapsible: true, 'disabled': [numbers], active: true }).css({ 'font-size': 'smaller' })
K N R
25-Nov-13 1:13am
View
hi,
Thanks for you comment. OCR is very expensive tool. i have lacs of files to convert the other languages. is there any another way...??
Regards
K N R
5-Nov-13 7:55am
View
i already tried, but it's not working.
K N R
5-Nov-13 7:23am
View
Please include below code,
string inputFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "Test.pdf");
string outputFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "Output.pdf");
int Startpage=1;
int endpage=2;
PdfReader reader = null;
Document sourceDocument = null;
PdfCopy pdfCopyProvider = null;
PdfImportedPage importedPage = null;
try
{
// Intialize a new PdfReader instance with the contents of the source Pdf file:
reader = new PdfReader(sourcePdfPath);
// For simplicity, I am assuming all the pages share the same size
// and rotation as the first page:
sourceDocument = new Document(reader.GetPageSizeWithRotation(startPage));
// Initialize an instance of the PdfCopyClass with the source
// document and an output file stream:
pdfCopyProvider = new PdfCopy(sourceDocument,
new System.IO.FileStream(outputPdfPath, System.IO.FileMode.Create));
sourceDocument.Open();
// Walk the specified range and add the page copies to the output file:
for (int i = startPage; i <= endPage; i++)
{
importedPage = pdfCopyProvider.GetImportedPage(reader, i);
}
sourceDocument.Close();
reader.Close();
}
catch (Exception ex)
{
throw ex;
}
K N R
5-Nov-13 6:08am
View
Hi,
thanks for your comment. am using below code,
public void ExtractPages(string sourcePdfPath, string outputPdfPath, int startPage, int endPage)
{
PdfReader reader = null;
Document sourceDocument = null;
PdfCopy pdfCopyProvider = null;
PdfImportedPage importedPage = null;
try
{
reader = new PdfReader(sourcePdfPath);
sourceDocument = new Document(reader.GetPageSizeWithRotation(startPage));
pdfCopyProvider = new PdfCopy(sourceDocument,
new System.IO.FileStream(outputPdfPath, System.IO.FileMode.Create));
sourceDocument.Open();
for (int i = startPage; i <= endPage; i++)
{
importedPage = pdfCopyProvider.GetImportedPage(reader, i);
}
sourceDocument.Close();
reader.Close();
}
catch (Exception ex)
{
throw ex;
}
}
Please give me a suggestion, how to apply background color.
K N R
3-Apr-13 3:01am
View
Thank you amit.
K N R
7-Dec-12 0:16am
View
Can i get delivery response from this code.
K N R
6-Nov-12 4:43am
View
Problem solved my self
K N R
29-Jun-12 7:12am
View
Deleted
sorry...!
I want path to go directly
K N R
13-Apr-12 3:31am
View
sorry...!!!
K N R
12-Apr-12 10:26am
View
Hi sanju,
I read this link. here i have one method. i call that method into do_work event.
that method have many loops. So it gives exception.
K N R
28-Feb-12 1:12am
View
thanks a lot abhinav
K N R
8-Jan-12 2:27am
View
hi sakryukov,
thanks for your reply,
In sql script have one stored procedure and the file is in ~/app_data/script.sql
K N R
4-Jan-12 7:39am
View
I have 10000 records in a datatable and i am deleting those records. When ever i am deleting those records that's taking a too much time to delete. so could you please tell me if there is a any better way to delete the records quickly
K N R
27-Dec-11 8:51am
View
i have one query but i can't see that query. With out seeing that query how could i find out table name which are used in that query.
K N R
27-Dec-11 8:34am
View
Hi Mark,
Yes, your are right. That's not a possible to find tables if i used views in my query but i want to find tables from query which doesn't used views in the queries. I am taking a queries which doesn't have a views.
K N R
27-Dec-11 8:23am
View
Hi John,
i will clarify you what i exactly need in the above query am using two tables.
By seeing that query i can find out which table i am using and how many tables are am using. Now what i want is am storing a queries which are using in sql server (ssms). I want to know in that query how many tables are there and which tables those are but my problem is i can't see that query.
So with out seeing that query how could i find out the tables of used in that query.
K N R
27-Dec-11 0:54am
View
this one is decrypted code
public DataSet ReadEncrypteddataset()
{
DataSet set = new DataSet();
string Encrypteddata = "";
using (StreamReader reader = new StreamReader(Filepath))
{
Encrypteddata = reader.ReadToEnd();
}
string DecryptedData = DecryptString(myKey, Encrypteddata);
set.ReadXml(new StringReader(DecryptedData));
return set;
}
public static string DecryptString(string key, string data)
{
if (key.Length != 8) throw new Exception("Key length must be equal 8.");
if (data.Length <= 0) throw new Exception("Length of string to encrypt can not be zero.");
byte[] inputBytearray = new byte[data.Length];
byte[] keyByteArray = new byte[key.Length];
string Result = "";
DESCryptoServiceProvider des = new DESCryptoServiceProvider();
using (MemoryStream ms = new MemoryStream())
{
keyByteArray = Encoding.UTF8.GetBytes(key);
inputBytearray = Encoding.UTF8.GetBytes(data);
using (CryptoStream cs = new CryptoStream(ms, des.CreateDecryptor(keyByteArray, inputBytearray), CryptoStreamMode.Write))
{
//byte[] plainTextBytes = new byte[inputBytearray.Length];
//int decryptedByteCount = cs.Write(plainTextBytes, 0, plainTextBytes.Length);
cs.Write(inputBytearray, 0, inputBytearray.Length);
cs.FlushFinalBlock();
}
Result = Encoding.UTF8.GetString(ms.ToArray());
}
return Result;
}
K N R
27-Dec-11 0:53am
View
hi varun,
this is the encrypted code
public static string EncryptString(string key, string data)
{
if (key.Length != 8) throw new Exception("Key length must be equal 8.");
if (data.Length <= 0) throw new Exception("Length of string to encrypt can not be zero.");
byte[] inputBytearray=new byte[data.Length];
byte[] keyByteArray = new byte[key.Length];
string Result = "";
DESCryptoServiceProvider des = new DESCryptoServiceProvider();
using (MemoryStream ms = new MemoryStream())
{
keyByteArray = Encoding.UTF8.GetBytes(key);
inputBytearray = Encoding.UTF8.GetBytes(data);
using (CryptoStream cs = new CryptoStream(ms,des.CreateEncryptor(keyByteArray,inputBytearray),CryptoStreamMode.Write))
{
cs.Write(inputBytearray,0,inputBytearray.Length);
cs.FlushFinalBlock();
}
Result = Convert.ToBase64String(ms.ToArray());
}
return Result;
}
K N R
24-Dec-11 0:49am
View
hey amir,
how to get one specified table script.
K N R
24-Dec-11 0:32am
View
Thanks Amir.
K N R
24-Dec-11 0:13am
View
Hi amir,
I am not mentioned size, because in dataset data assume 5000 records is there. then am split into first 1-1000 records and next 1000-2000 and so on...
like this way i want to split.
K N R
13-Dec-11 8:51am
View
hey Laxmi,
In my requirement is in windows application
K N R
6-Dec-11 2:02am
View
i want only given query table names
K N R
6-Dec-11 1:55am
View
1) select id from tablename1 t1,tablename2 t2 where t1.id=t2.id
2) select * from tablename1 t1 inner join tablename2 t2 on t1.id=t2.id
K N R
28-Nov-11 0:33am
View
yes prasad
K N R
21-Nov-11 23:46pm
View
how to filter oracle and sql servers
K N R
6-Nov-11 23:07pm
View
am using windows forms
K N R
31-Oct-11 4:34am
View
Incorrect syntax near the keyword 'select'.
K N R
29-Oct-11 5:00am
View
THANK U...!!!
K N R
29-Oct-11 4:52am
View
hey amir,
am also getting no error. but how can i run this different databases
K N R
26-Oct-11 2:37am
View
thanks mehdi....!!!
K N R
20-Oct-11 9:59am
View
OK thanks for ur suggestion
K N R
20-Oct-11 9:38am
View
hi mehdi,
forgot datetime, is there any way to delete data
K N R
18-Oct-11 7:20am
View
i am asking about only sqlserver
K N R
17-Oct-11 9:56am
View
ya am using bcp command
K N R
17-Oct-11 9:28am
View
hey shijuse,
i am not maintain archive data in same database or another database. It will be another like notepad or xml files.
K N R
15-Oct-11 5:08am
View
yes i think the above link is very usefull..
thanks dave...
K N R
15-Oct-11 5:04am
View
thanks for your solution
K N R
14-Oct-11 9:06am
View
can you please explain me i am new about this requirement
K N R
14-Oct-11 9:03am
View
hey simon,
am not delete tables, only delete content.
K N R
14-Oct-11 8:55am
View
hey simon,
first to find child tables and find is their any relationship if their then find parent table. in this way is working or not..?
can you please help me.
K N R
14-Oct-11 7:16am
View
hi Andre,
Incorrect syntax near the keyword 'as'. am getting these error.
K N R
14-Oct-11 0:33am
View
hey mehdi,
I have only one stored procedure but it run in different databases.
K N R
13-Oct-11 10:55am
View
Hi, it displays error like this,
Conversion failed when converting the varchar value 'Error whilst Opening file "path", ' to data type int.
K N R
13-Oct-11 10:38am
View
Ya. ya..
K N R
13-Oct-11 10:29am
View
I have production data but 5 records in production data table and 5 records in archived like 'notepad'
K N R
13-Oct-11 10:18am
View
hey Reiss,
i did not understood what u are explaining, But i want only sql query can you please help me.
K N R
13-Oct-11 9:36am
View
hi reiss,
thans for reply, but the tables are not in same database it is in some flat files like notepad..
K N R
11-Oct-11 9:58am
View
hi andre,
Yes, i am access to multiple databases
K N R
10-Oct-11 8:57am
View
suppose i have 3 tables.
create table tabname(tid int primary key,tname varchar(100))
create table tabname1(tid int foreign key references tabname(tid),tabid int primary key)
create table tabname2(tabid int foreign key references tabname1(tabid))
so which table we are going to delete first.
K N R
10-Oct-11 7:43am
View
Hi sachin,
thanks for your rply.
Suppose if exists foreign key table have a primary key then what's the solution.
can you help me..!
K N R
6-Oct-11 0:52am
View
Hi Mehdi,
thanks for your suggestion. i am providing some information regarding that query.
can you please help me...!
K N R
5-Oct-11 2:04am
View
is it possible to write where condition in table1
K N R
5-Oct-11 2:00am
View
thanks abhinav,
this is really helpful to me
K N R
5-Oct-11 1:43am
View
Hi abhinav,
thanks for your reply. but i want query with specific time
thanks.
Show More