Categories
askquestion

Has anyone been able to edit text in an OpenWYSIWYG control dynamically?

Has anyone been able to edit text in an OpenWYSIWYG control dynamically?

Ask Question

Asked
11 years ago

Active
10 years, 1 month ago

Viewed
689 times

.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}

2

1

Like the question says has anyone been able to take a OpenWYSIWYG control and change its contents dynamically with JavaScript? It’s hard because it takes your textarea and transforms it into a WYSIWYG editor by making the textarea invisible and inserting some kind of iframe and uses that as the editor.

I’ve tried code like this but failed:

document.getElementById(“textarea-wysiwyg”).value = “BLARG”;

javascript openwysiwyg

share|improve this question

edited Feb 5 ’09 at 17:03

Andrew G. Johnson

asked Feb 5 ’09 at 15:59

Andrew G. JohnsonAndrew G. Johnson

24.3k2929 gold badges8585 silver badges132132 bronze badges

add a comment
 | 

1 Answer
1

active

oldest

votes

1

If you know that is it the only frame on the page then you can do something like this:

window.frames[0].document.body.innerHTML = ‘blarg’

The above works when I tried it on http://www.openwebware.com/wysiwyg/demo.shtml in firebug.

Hope this helps…

share|improve this answer

answered Feb 9 ’09 at 18:12

JackJack

17k1111 gold badges4141 silver badges4545 bronze badges

add a comment
 | 

Your Answer

Thanks for contributing an answer to Stack Overflow!Please be sure to answer the question. Provide details and share your research!But avoid …Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.To learn more, see our tips on writing great answers.

Draft saved
Draft discarded

Sign up or log in

Sign up using Google

Sign up using Facebook

Sign up using Email and Password

Submit

Post as a guest

Name

Email
Required, but never shown

Post Your Answer

Discard

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you’re looking for? Browse other questions tagged javascript openwysiwyg or ask your own question.

Blog

This week, #StackOverflowKnows fast planes, math with dates, and code comments

Community working group updates: February 2020

Featured on Meta

TLS 1.0 and TLS 1.1 removal for Stack Exchange services

How do the moderator resignations affect me and the community?

Related

495Resizing an iframe based on content181jQuery .ready in a dynamically inserted iframe0how to add text to openwysiwig editor by javascript code outside openwysiwig474Detect when browser receives file download2197How to decide when to use Node.js?145YouTube iframe API: how do I control a iframe player that’s already in the HTML?1Proxying a site to be able to WYSIWYG edit in iframe – How does it work?

Hot Network Questions

ASCII Pizza (no pineapple)

Are There Energy Monitoring Smart Plugs That Don’t Compromise my Privacy/Security?

Why doesn’t the ‘bm’ package work with the ‘unicode-math’ package?

Dystopia of a world where old people get killed

How do I know whether an airline seat upgrade at gate was free?

When a spell asks for targets, can I choose the same target multiple times?

Were Data and Lore created as a ‘pair’?

Is there any advantage of using a travel agent in this day and age?

Hessian Matrix and Physical directions: Potential Energy Surface

Is there any way to remove a rear cassette WITHOUT a cassette wrench?

“electricity was suddenly turned off” or ” electricity suddenly turned off ”

What would be the best way to capture a Giant?

Three way switch with two common wires?

How to access Tridion Config Component in Event System

First non-elected person in line of succession for British Government or Parliament?

I need to examine an 82.7G (!) text file. What can open it?

Any tips for photographing a political rally?

Unexplained muscle mass loss

Integrating acceleration – wrong choice of bounds in textbooks?

Creating a Continuous Decision Variable between 0 and 1 in Python-MIP Interface

Drawing from the Deck of Many Things with a Simulacrum

Can a world where everyone has a time machine be consistent?

Overloading a function using templates

What early middle ages weapons would suit an extremely strong child?

more hot questions

Question feed

Subscribe to RSS

Question feed
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

lang-js

Categories
askquestion

Sql Server (Entity Framework): created_at , updated_at Columns

Sql Server (Entity Framework): created_at , updated_at Columns

Ask Question

Asked
11 years ago

Active
11 years ago

Viewed
3k times

.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}

4

4

I think I should mention I’m trying to get Entity FrameworkSQL server to do something that I was used to coming from Rails. I really just want to know the ‘best’ way to have automatic created_at & updated_at column values for records that I insert/update in the database.

Right now I’ve hooked into the ObjectContext.SavingChanges event and things are working well. After I wrote and tested my code however I realize that there may be a better or faster way to do this.

sql-server ruby-on-rails entity-framework

share|improve this question

edited Feb 5 ’09 at 17:25

Bill

asked Feb 5 ’09 at 15:59

BillBill

1,52311 gold badge1515 silver badges2828 bronze badges

add a comment
 | 

1 Answer
1

active

oldest

votes

9

One method is to use insert/update triggers to set the created_at and updated_at columns to the current time.

The Insert trigger would look something like this:

CREATE TRIGGER [dbo].[inserted_myTable] ON [dbo].[myTable] AFTER INSERT
AS
BEGIN
SET NOCOUNT ON;
UPDATE [dbo].[myTable] Set AdmitDateTime = GetDate() where pkid in (SELECT pkid FROM Inserted)
END

The Update trigger would look something like this:

CREATE TRIGGER [dbo].[updated_myTable] ON [dbo].[myTable] AFTER UPDATE
AS
BEGIN
SET NOCOUNT ON;
UPDATE [dbo].[myTable] Set AdmitDateTime = GetDate() where pkid in (SELECT pkid FROM Inserted)
END

One advantage of the trigger approach is that the time/date will always be in the same time zone. Another advantage is that if someone modifies the database record outside of your application, the fields are still updated.

share|improve this answer

edited Feb 5 ’09 at 17:08

answered Feb 5 ’09 at 16:23

Friend Of GeorgeFriend Of George

46811 gold badge44 silver badges1414 bronze badges

See here for an explaination of NOCOUNT: msdn.microsoft.com/en-us/library/ms189837.aspx

– Friend Of George
Feb 25 ’10 at 17:36

add a comment
 | 

Your Answer

Thanks for contributing an answer to Stack Overflow!Please be sure to answer the question. Provide details and share your research!But avoid …Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.To learn more, see our tips on writing great answers.

Draft saved
Draft discarded

Sign up or log in

Sign up using Google

Sign up using Facebook

Sign up using Email and Password

Submit

Post as a guest

Name

Email
Required, but never shown

Post Your Answer

Discard

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you’re looking for? Browse other questions tagged sql-server ruby-on-rails entity-framework or ask your own question.

Blog

This week, #StackOverflowKnows fast planes, math with dates, and code comments

Community working group updates: February 2020

Featured on Meta

TLS 1.0 and TLS 1.1 removal for Stack Exchange services

How do the moderator resignations affect me and the community?

Linked

1

Automatically update Last Modified Date in ASP.Net MVC app

Related

818Entity Framework vs LINQ to SQL2700Add a column with a default value to an existing table in SQL Server1737How to return only the Date from a SQL Server DateTime datatype1817How to check if a column exists in a SQL Server table?1099Check if table exists in SQL Server1867How to concatenate text from multiple rows into a single text string in SQL server?1545LEFT JOIN vs. LEFT OUTER JOIN in SQL Server3608How do I UPDATE from a SELECT in SQL Server?1147Find all tables containing column with specified name – MS SQL Server1219How to Delete using INNER JOIN with SQL Server?

Hot Network Questions

What’s the difference between “люблю” and “обожаю”?

Any tips for photographing a political rally?

Who were the seven dwarves Sauron gave the Rings of Power to?

Three way switch with two common wires?

Do the US NTSB and other investigative agencies charge airlines for investigations?

How to modify a method which dynamically calls upon a set of various child classes to work for any new child class

Is it ever neccesary to burn a starter out?

Is there a unix-like system that doesn’t come with Perl?

Is there any material which cannot be cut by a lightsaber?

Hessian Matrix and Physical directions: Potential Energy Surface

First non-elected person in line of succession for British Government or Parliament?

My name is akin to my size

How do you name nodes/vertices with this type of code?

Is there any way to remove a rear cassette WITHOUT a cassette wrench?

Why did equal temperament become the standard tuning system for keyboard instruments?

How does apt upgrade running programs?

Incorporating fruits in creme brulee

Paint 21 Squares of a 7×7 Board Without Forming a Rectangle

What would be the best way to capture a Giant?

I need to examine an 82.7G (!) text file. What can open it?

Is it possible to run a monochrome LCD without driver circuit with an Arduino Uno?

ASCII Pizza (no pineapple)

Do UK visa documents not in English or Welsh have to be translated officially?

Why do airliners park with the nose facing the terminal?

more hot questions

Question feed

Subscribe to RSS

Question feed
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

lang-sql

Categories
askquestion

Altering the user-agent string with the HTMLControl

Altering the user-agent string with the HTMLControl

Ask Question

Asked
11 years ago

Active
6 years, 6 months ago

Viewed
72 times

.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}

0

I’m writing an app (VS2005, C++, targeting WM5) which is hosting the HTML Control. Can I modify the user-agent this control uses when making a request to a server?

windows-mobile

share|improve this question

edited Jul 29 ’13 at 22:11

meshy

6,21366 gold badges4040 silver badges6565 bronze badges

asked Feb 5 ’09 at 15:59

brismithbrismith

66633 silver badges1313 bronze badges

add a comment
 | 

1 Answer
1

active

oldest

votes

-1

http://msdn.microsoft.com/en-us/library/system.web.httpresponse.addheader.aspx

Use AddHeader to modify the useragent.

Since you are in a control, use this to get to your current HttpResponse object.
this.Page.Response.AddHeader

share|improve this answer

edited Feb 5 ’09 at 16:28

answered Feb 5 ’09 at 16:06

Chris BallanceChris Ballance

30.4k2525 gold badges9898 silver badges147147 bronze badges

He doesn’t have an HttpResponse object. The question wants to know how to change the agent string being sent from an HTMLControl.

– ctacke
Feb 5 ’09 at 16:08

Sure he does. Just reference the current page’s HttpResponse object.

– Chris Ballance
Feb 5 ’09 at 16:29

I’m not using .Net CF. Is the HttpResponse object available by accessing a particular COM Interface?

– brismith
Feb 10 ’09 at 14:47

add a comment
 | 

Your Answer

Thanks for contributing an answer to Stack Overflow!Please be sure to answer the question. Provide details and share your research!But avoid …Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.To learn more, see our tips on writing great answers.

Draft saved
Draft discarded

Sign up or log in

Sign up using Google

Sign up using Facebook

Sign up using Email and Password

Submit

Post as a guest

Name

Email
Required, but never shown

Post Your Answer

Discard

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you’re looking for? Browse other questions tagged windows-mobile or ask your own question.

Blog

This week, #StackOverflowKnows fast planes, math with dates, and code comments

Community working group updates: February 2020

Featured on Meta

TLS 1.0 and TLS 1.1 removal for Stack Exchange services

How do the moderator resignations affect me and the community?

Related

2Possible to detect the *type of mobile device* via javascript or HTTP Headers?2Windows Mobile Emulator networking to host machine1Auto-size controls in .NET CF to avoid horizontal scrolling?0Wrapping the HTML Control on Windows Mobile1HTML Control in Windows Mobile 6.1 Professional8Passing a C# string to an unmanaged C DLL in Windows Mobile1How to disable WM6.5.3 gestures?0Mobile Compact Framework 2.0 Install unsuccessful from Win7 generated from VS20081How to: WCF Service check if Windows Forms user is still active?

Hot Network Questions

Unexplained muscle mass loss

What’s the difference between “люблю” and “обожаю”?

What is the word for an animal species which only eats one type of food?

ASCII Pizza (no pineapple)

Dystopia of a world where old people get killed

Why are the clouds white and Australia black in weather satellite infrared images?

Any tips for photographing a political rally?

Incorporating fruits in creme brulee

Managing New Player “Murder Hobos”

Single NPN or NPN+PNP (push pull) to drive a P-MOSFET

Contractor day rate – calculating based off pro rata annual ‘salary’

How to deal with parents that enforce a curfew on an adult

How do I execute/test a large set of test cases with limited time and resources?

Regexp for matching quoted strings that may have control characters in them

How do I know whether an airline seat upgrade was free?

Linux backup utility for incremental backups

Fastest yes in the west

Flexibility over solidity? Defending against 1. e4

Is it ever neccesary to burn a starter out?

Why is learning mathematics compulsory?

How can I say “to be tired of verbING” in Japanese?

Who first solved the classical harmonic oscillator?

Detect manual changes to an autogenerated C header

What is this narrow band of clouds?

more hot questions

Question feed

Subscribe to RSS

Question feed
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Categories
askquestion

Why doesn’t WebBBS work now that I’ve migrated to a new server?

Why doesn’t WebBBS work now that I’ve migrated to a new server?

Ask Question

Asked
11 years ago

Active
9 years, 8 months ago

Viewed
86 times

.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}

0

I’ve moved a WebBBS board from one server to another. Ever since the board doesn’t work.
I’m getting an Apache error whenever I try to access the board. Don’t even know where to start the debugging, I’m not a Perl person. The file paths remained the same and there isn’t any DB involved.

http://gammonline.com/members/board/

Any ideas?

After a bit of testing I believe that the problem has something to do with the index.cgi which is located in that folder (not getting the error when renaming it).

Thanks,

Roy.

perl apache webbbs

share|improve this question

edited May 31 ’10 at 2:31

Sampson

239k6565 gold badges494494 silver badges540540 bronze badges

asked Feb 5 ’09 at 15:59

Roy PelegRoy Peleg

92022 gold badges88 silver badges2525 bronze badges

add a comment
 | 

2 Answers
2

active

oldest

votes

3

More information about this error may be available in the server error log.

Says it all. You will have to find the error log and look at it.

If you are using CGI, the first step is to check you have given it the right permissions so it is an executable script at all.

chmod 755 index.cgi

share|improve this answer

answered Feb 5 ’09 at 16:14

bobincebobince

470k9595 gold badges600600 silver badges786786 bronze badges

add a comment
 | 

1

This is caused by Apache config errors. Set LogLevel debug and tail -f the error log. It will probably be something to do with .htaccess permission for override, or, it’s requiring a module which isn’t loaded. The error log will tell you instantly.

share|improve this answer

answered Feb 5 ’09 at 16:07

Andrew TaylorAndrew Taylor

1,8641818 silver badges1919 bronze badges

add a comment
 | 

Your Answer

Thanks for contributing an answer to Stack Overflow!Please be sure to answer the question. Provide details and share your research!But avoid …Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.To learn more, see our tips on writing great answers.

Draft saved
Draft discarded

Sign up or log in

Sign up using Google

Sign up using Facebook

Sign up using Email and Password

Submit

Post as a guest

Name

Email
Required, but never shown

Post Your Answer

Discard

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you’re looking for? Browse other questions tagged perl apache webbbs or ask your own question.

Blog

This week, #StackOverflowKnows fast planes, math with dates, and code comments

Community working group updates: February 2020

Featured on Meta

TLS 1.0 and TLS 1.1 removal for Stack Exchange services

How do the moderator resignations affect me and the community?

Related

177How can I install Apache Ant on Mac OS X?35How to solve import errors while trying to deploy Flask using WSGI on Apache20URL rewriting question2Perl module Image::Imlib2 trouble saving gifs0Why is this .htaccess file mod_rewrite not working?2Perl library not working on WampServer0Issue moving file1Cygwin Perl CGI with Xampp

Hot Network Questions

How do Trump’s public statements make DOJ’s job impossible?

How can I say “to be tired of verbING” in Japanese?

“electricity was suddenly turned off” or ” electricity suddenly turned off ”

What is this narrow band of clouds?

Who were the seven dwarves Sauron gave the Rings of Power to?

Definition of a general rule

Coupling Theory vs reality

What happens if an aircraft tries to land at MTOW (if greater than MLW)?

Can random forest detect squared terms?

What is right way to set up King & Queen In the beginning of game?

How do Aarakocra fly with a backpack?

My name is akin to my size

How do I sail rafts in Breath of the Wild?

Since the caster of the Zone of Truth spell knows whether a creature failed the save, can they use it to detect hidden/invisible creatures?

Why do airliners park with the nose facing the terminal?

Why is learning mathematics compulsory?

Artificier Resistant Armor Infusion

When a spell asks for targets, can I choose the same target multiple times?

Can you Rappel with an Old Climbing Rope?

SQL Query timing out – Optimization Help?

DAD and link local address

Three way switch with two common wires?

How to access Tridion Config Component in Event System

Are There Energy Monitoring Smart Plugs That Don’t Compromise my Privacy/Security?

more hot questions

Question feed

Subscribe to RSS

Question feed
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

lang-perl

Categories
askquestion

Why is EDI still used, and how to deal with it?

Why is EDI still used, and how to deal with it?

Ask Question

Asked
11 years ago

Active
3 months ago

Viewed
15k times

.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}

17

9

Why is this archaic format still used in the face of easier-to-use technologies? Does it provide some benefit that I’m not seeing? It seems that a large amount of vendors still provide data only in this format, instead of something more manageable and easier to use such as XML; at the least it would make sense to me to offer both formats.

Also, what are some good ways to deal with and utilize EDI when you have no other choice but to use it? Something like BizTalk is out of the question as it’s far too expensive. Are there any free/open source applications that make EDI easier to work with?

edi

share|improve this question

edited Feb 5 ’09 at 16:31

Wayne Molina

asked Feb 5 ’09 at 16:00

Wayne MolinaWayne Molina

16.7k2323 gold badges9090 silver badges154154 bronze badges

Subjective and Argumentative: See ‘cryptic’, ‘zero sense to me’, other systems are ‘more effecient’, ‘headache to parse’, ‘archaic’ ‘easier to use’ ‘read chinese’.

– George Stocker
Feb 5 ’09 at 16:09

@Gortok: Yes, he is being subjective, but there is a question hidden inside the rant: What are the pros and cons of the EDI format?

– Sebastian Dietz
Feb 5 ’09 at 16:16

EDI stands for Electronic Data Interchange, not Human Data Interchange. Its not meant to be human readable. Its compact and well defined. I’ve converted 7MB EDI file to XML, and they ended up being 45MB+. The conversion size is not linear. Larger EDI files could get huge.

– L_7337
Nov 1 ’13 at 20:11

@L_7337 Same could be achieved for XML with some standard compression algorithm that no one needs to see.

– Martin Clemens Bloch
Nov 19 ’13 at 7:14

same reason why we use QWERTY keyboards

– Max Hodges
Dec 18 ’15 at 2:34

add a comment
 | 

18 Answers
18

active

oldest

votes

19

EDI is not that hard to understand once you familiarize yourself with the delimiters it uses. You might ask yourself as well why anyone would still be using CSV or tab-delimited data.

The answer is probably that those formats are “domain specific languages” defined by committee and standardized in a certain industry, and that a lot of money has already been invested in supporting those formats. Where’s the business case to throw that all out again?

share|improve this answer

answered Feb 5 ’09 at 16:05

Dave Van den EyndeDave Van den Eynde

15.6k66 gold badges5555 silver badges7979 bronze badges

1

I’ve found that EDI is easy enough to read in. The difficult part is writing EDI documents that other systems don’t complain about. It seems that even if you are following the specs, they still complain.

– Kibbee
Feb 5 ’09 at 16:18

In fact, I’ve created a DSL to map EDI transaction sets (both ways). It was almost trivial.

– dkretz
Feb 5 ’09 at 16:46

3

@Kibbee: Sounds like developing web sites for Internet Explorer!

– Peter Di Cecco
Oct 9 ’09 at 17:08

add a comment
 | 

16

One word, Inertia. Developing the EDI formats by committee between various companys and organisations with different agendas was a nightmare (sad to say I have been there).

Asking them to abandon these with yet another round of committees agreeing web service API standards is going to take even longer, how do you sell the idea of replacing one electronic format with another to a non-technical board? What possible busness advantage does it give them. Originally the benefits of electronic exchange were clear but replace one with another is not. We’re talking really big companies here.

share|improve this answer

answered Feb 5 ’09 at 16:05

AnthonyWJonesAnthonyWJones

171k3030 gold badges225225 silver badges295295 bronze badges

1

Exactly. Suppliers aren’t software development companies. They don’t see the value in switching to new systems. They don’t have the inhouse expertise to do anything, and hiring somebody would be extremely expensive.

– Kibbee
Feb 5 ’09 at 16:24

not really “inertia”; it’s due to the “network effect” en.wikipedia.org/wiki/Network_effect

– Max Hodges
Dec 18 ’15 at 3:40

add a comment
 | 

9

You may be interested in the following project:

http://bots.sourceforge.net/en/index.shtml
Google code archive

share|improve this answer

edited Sep 16 ’16 at 22:38

MrMesees

7631212 silver badges1818 bronze badges

answered Feb 5 ’09 at 16:45

nullnull

6,46844 gold badges2222 silver badges2828 bronze badges

add a comment
 | 

6

A little information for all interested. EDI is basically a design by committee data exchange format that not only set out rules for data formatting (like XML), but also set out to define each document that could possibly ever be sent between 2 companies. So for any piece of data that could be exchanged between companies they came up with an exact definition of what was supposed to be in each of these documents. Of course, nobody could foresee every piece of data that 2 companies would want to exchange. So you end up with companies using fields that were defined for 1 thing, being used for some other piece of information.

What you ended up with, is an extremely convoluted data format, in which many people using it don’t follow the standards, because they need to send custom information, which the standard doesn’t account for. So in the end, you still need to talk to each company you want to deal with, and find out all the little idiosyncrasies of their implementation, just as you would have to do if you went to someone with a custom XML interface. Except that in the case of EDI, the format is hard to parse and even harder to write well, so you end up doing a whole bunch of work just to send a document, when doing the same kind of think with having a custom XML solution would have resulted in many times less problems.

share|improve this answer

answered Feb 5 ’09 at 16:37

KibbeeKibbee

60.8k2626 gold badges134134 silver badges175175 bronze badges

1

But then you get trading partners who extend the XML formats for the same data and same purposes in wildly different ways, so the same consequences result. We all like our own hammer better than the others, but they all drive in the nails semi-crooked sometimes.

– dkretz
Feb 5 ’09 at 16:44

1

My whole point is that you can’t try to standardize the documents sent across the entire industry. Instead, everybody would just be better off if they just used XML, and defined their own DTD for others to adhere to, instead of trying to get everybody to agree on a single DTD, or data format.

– Kibbee
Feb 5 ’09 at 16:51

Just because 100% of the message exchange requirements can’t be standardized isn’t a reason vote for a free for all approach.

– Puneet Lamba
Feb 17 ’13 at 3:50

add a comment
 | 

6

And switching to XML would give you what – a slightly easier to debug line format?

Generally you set it up and leave it, there isn’t a lot of need to play with the raw EDI feed, certainly not enough to abandon the standard and start again.
There are lots of standards, like FAX that could be made more readable but no real pressing need to change them.

share|improve this answer

edited Feb 6 ’09 at 1:51

answered Feb 5 ’09 at 16:05

Martin BeckettMartin Beckett

86.2k2121 gold badges170170 silver badges247247 bronze badges

Have you ever review an EDI format, even something simple like an EDIFACT order? What tools are there to easily consume it and extend it? There might be some but we’re talking several digits of currency to get what XML gives for free.

– AnthonyWJones
Feb 5 ’09 at 16:10

1

+1 AnthonyWJones. Exactly my problem with EDI – it’s ridiculously hard to parse whereas XML is easy to consume and extend.

– Wayne Molina
Feb 5 ’09 at 16:17

1

It’s not a matter of slightly easier. EDI is orders of magnitude harder to do correctly than XML.

– Kibbee
Feb 5 ’09 at 16:19

@AWJ I review them frequently (or used to, now it’s filtered through for the most part). I have a much harder time finding the data embedded in XML cruft. With EDI I can insert a newline at the segment breaks and things more or less line up vertically within a screen-width. It’s what you’re used to.

– dkretz
Feb 5 ’09 at 16:40

add a comment
 | 

6

Because it’s a formally established Standard (in fact a very large and comprehensive set of standards). And that’s one of the claimed benefits of a standard – you won’t need to change anything for a long time.

And to change it, it takes agreement between two or more (often thousands and thousands more) trading partners (including maybe all of your competitors) to agree.

EDI formats have much higher signal-to-noise ratios (because they were designed back when that was considered important.) Someone who knows and understands EDI will look at your XML and say “Where’s the beef (data)?”

Very few developers write their own parsers. There are many good mappers available (and many legacy and enterprise apps come with them built in). So there’s lots of relief available for your pain (including at least one Open Source app on SourceForge).

share|improve this answer

edited Jul 24 ’13 at 2:34

answered Feb 5 ’09 at 16:35

dkretzdkretz

35.8k1313 gold badges7575 silver badges131131 bronze badges

add a comment
 | 

5

“If it ain’t broke, don’t fix it.”

Most of these organisations are processing vast amounts of data using EDI, and aren’t about to change to something more modern without a compelling reason. And making things easy for third-party developers doesn’t usually qualify, sad to say.

share|improve this answer

answered Feb 5 ’09 at 16:06

Mike EdwardsMike Edwards

42222 silver badges22 bronze badges

add a comment
 | 

5

IMHO there are several problems with EDIFACT.

It is not easy to parse or generate an Object model from it. This is probably not a big problem anymore as there are now good system around that do it for you e.g. smooks.org
It is not easy to read. You get used to but XML is a lot easier to read
Validation isn’t that easy (compare that to validating XML)
There are far too many different versions and flavours, D95B, D96B, D00A, D00B etc.
But I think the biggest problem is that everyone is using the standards differently. They use the same ‘format’ but the fields are defined differently. We use EDIFACT to send and receive messages from Container Terminals and they all have slight differences. They would e.g. all use a D95B CODECO but for some terminals a certain segment is mandatory while for another it is optional or even not allowed to be there. Then you have segments that are used the same but the content in it is different.

So to summarise it: It is a pain in the neck.

share|improve this answer

answered Nov 4 ’11 at 14:47

BenBen

1,49233 gold badges1717 silver badges3131 bronze badges

add a comment
 | 

4

EDI is a very compact format and is often used to keep bandwidth usage in data exchanges as small as possible. The German customs offices for example use it in their ATLAS system to exchange a very high volume of data every day.

It is hard to parse and hard to read, but if the size of the resulting data matters, it can be a good choice and is supported by most of the bigger business applications.

share|improve this answer

answered Feb 5 ’09 at 16:09

Sebastian DietzSebastian Dietz

5,25411 gold badge2525 silver badges3737 bronze badges

Towards this point alot of valued added networks (VANs) still charge kilocharacter rates. The more characters the more it costs.

– direct
Oct 18 ’16 at 15:32

add a comment
 | 

3

Legacy Support

share|improve this answer

answered Feb 5 ’09 at 16:02

GWLlosaGWLlosa

21.3k1717 gold badges6868 silver badges103103 bronze badges

add a comment
 | 

3

EDI is prolific in many industries. It would be prohibitively expensive to replace an already-working technology with a newer one.

Consider this, Walmart uses EDI to communicate with its vendors, stores, distribution chain, etc. I’m guessing they deal with tenss of thousands of vendors. Every one of them has sunk thousands of dollars into EDI technology. If Walmart decided to switch over to XML, its a decision that affects thousands of companies, not just Walmart.

This is true for any EDI user. After all, it’s a standard used between trading partners.

I agree, EDI is a pain to work with. But ‘back in the day’, that’s all we had.

share|improve this answer

answered Feb 5 ’09 at 16:25

Marc BernierMarc Bernier

2,8122121 silver badges4040 bronze badges

1

Care to recommend anything to ease the pain of dealing with it, then? My frustration is because my company switched vendors and this new one only offers data in EDI format (the old one offered it in text as well), so I’m scrambling to figure out a way to integrate it with our systems

– Wayne Molina
Feb 5 ’09 at 16:28

@WayneM I may be missing something, but can’t you use XSLT to transform your XML into EDI? XML->XSLT->EDI seems much easier than EDI->CustomeParser->XML… again I may be over simplifying.

– null
Feb 5 ’09 at 16:40

I’m not using XML; I just need to extract the data – I was hoping the supplier was using XML and not EDI since XML is easier to parse the data I need.

– Wayne Molina
Feb 5 ’09 at 16:50

@WayneM, there are a few companies that offer EDI mapping software that will translate EDI docs into user-defined formats. We used to use Sterling Commerce’s product, but honestly, it was a love/hate relationship.

– Marc Bernier
Feb 5 ’09 at 17:17

add a comment
 | 

3

Edifact is one of the best standards when it comes down to document interchange.
Most problems come from tradingpartners sending non standardized documents.

Yes it’s a bit odd format and is tedious to work with if you don’t know the ins and outs but that goes for XML as well.

You really want XML over Edifact? Look at the bloated, hard to read XML standards peppol (pan-european public procurement online) is working on.

Yes it’s working nice and dandy if you don’t have any errors in the systems, troubleshooting edifacts is so much easier once you get used to the format than troubleshooting UBL documents.

You say you have $0.00 to use on the project?
You really should look into the amount of manual work done in your company and the costsavings EDI can offer some cost benefit analysis can be mighty handy.

share|improve this answer

edited Nov 5 ’12 at 7:09

Toon Krijthe

49.3k2222 gold badges133133 silver badges197197 bronze badges

answered Dec 4 ’11 at 10:57

plykkegaardplykkegaard

5711 silver badge66 bronze badges

1

Have a look at edidev, stylusstudio or liaison Liaison has a free program EDI Notepad which is quite handy if you’re unfamiliar with edifact There’s also quite a few java parsers out there if it’s gotta be opensource Agreed that BizTalk is a bit prizy but so is must large ERP systems, look at the prize in that context 🙂

– plykkegaard
Dec 9 ’11 at 16:41

add a comment
 | 

3

What types of information can be exchanged via EDI?

A variety of types of business information exchange is available via EDI including:

-•Booking information

-•Bill of Lading information

-•Invoicing

-•Electronic Funds Transfer

-•Arrival Notice Information

-•Shipment Status Information

How would choosing EDI benefit my company?
-•It streamlines the communications process between you and APL

-•It eliminates the need to rekey data, thus eliminating errors and the need to recheck information

-•It eliminates paper handling and the need for document storage

-•It improves the turntime and the accuracy of your data

-•It eliminates the need for faxing

share|improve this answer

answered Sep 27 ’13 at 14:16

kaushik0033kaushik0033

58033 silver badges1111 bronze badges

add a comment
 | 

2

One solution, although it will cost you, is to go to a company like ADX, which has tools you can use to convert EDI formats to more pleasing formats like CSV. Depending on the volume and type of transactions you are doing, this can be both affordable and a lot less stressful. I’ve used their products in the past, and while they are a bit of work to set up, they do work quite well, and are very stable. Because of the history of EDI, you could probably find hundreds of other companies that offer similar services.

share|improve this answer

edited Nov 4 ’19 at 11:32

xyz

20.3k3333 gold badges102102 silver badges145145 bronze badges

answered Feb 5 ’09 at 16:41

KibbeeKibbee

60.8k2626 gold badges134134 silver badges175175 bronze badges

Unfortunately, my budget is $0.00. I’ll keep it in mind, though, in case I need to use it.

– Wayne Molina
Feb 5 ’09 at 16:43

Are they paying you $0.00 to do the work? Because if they aren’t, you really should argue that it could be completed with far less overall cost to just pay someone else for a solution.

– Kibbee
Feb 5 ’09 at 16:53

add a comment
 | 

1

EDI has been around since before XML. Apart from the fact that two parties can pre-negotiate the EDI format that works for them both you must also consider the part of the VAN (value added network.)

In some cases the VAN performs validation of the message, or even reads the message and performs actions on it, such as copying it to additional parties based on its content.

The only reason really to use EDI is because “that’s the way it’s always been done”, and therefore there is a lot of existing infrastructure around to support it. Why switch to XML when there is no need? And how is to say XML wont be replaced by JSON which will then be replaced by something else?

share|improve this answer

answered Feb 5 ’09 at 16:13

Peter MorrisPeter Morris

8,62555 gold badges5353 silver badges9797 bronze badges

JSON is for data, XML is for documents. That is an important distinction.

– Bernard Igiri
Feb 5 ’09 at 16:22

Please explain what you mean.

– Peter Morris
Feb 5 ’09 at 16:40

add a comment
 | 

1

Another reason is that being business messages such as order. invoices, credit notes etc there is a lot of financial worth in the transactions and they need to be secure but perhaps more importantly they need have end to end validation and verification as well as non repudiation.

For example i send you an order for 1/2 million Euros worth of goods, you send me the goods, then i “lose” the order information and tell you i am not paying. The combination of the standards and the VANS make this almost impossible or at least with so much of an audit trail that it the problems could be tracked. This is why the “Oh let use xml and the internet instead of EDIFACT and the VANS” tend to fail. As someone els answered, Inertia, but it is an inertia founded in a stable effective, secure, reliable and well understood system.

Doing it on the cheap is not always an option.

If it is any consolation when i first implemented EDI in ’87 there was virtually no software around and so i got the Interbridge tables and wrote my own parser for the UK TRADACOMS standard using Cognos software on and HP Mini, and it worked fine. Assuming you are trading with other EDI partners the cost probably comes at the point of needing to use a VAN.

share|improve this answer

answered Nov 7 ’09 at 9:10

PurplePilotPurplePilot

6,22433 gold badges3232 silver badges4141 bronze badges

add a comment
 | 

1

I’ve used EDI (ANSI X12 and EDIFACT) in 2 projects about Maritime Transport Logistics and found them to be very useful since most Ocean Carriers and Trading Partners accept them as the standard way of communication between their different systems.

So EDI format is still used and will continue to be used since it’s a stablished standard and thousand companies have developed systems around them, and replacing them is a really big deal.

share|improve this answer

answered Jul 9 ’14 at 16:53

NathanNathan

2,2871919 silver badges2727 bronze badges

add a comment
 | 

0

I’ve had to use EDI as well and I agree. We used BizTalk to map it which worked well. Many system are built on EDI(well before XML).

share|improve this answer

edited Feb 5 ’09 at 16:12

answered Feb 5 ’09 at 16:03

Matt DavisonMatt Davison

1,4881010 silver badges1111 bronze badges

Maybe I wouldn’t have the problem if I was using BizTalk… but unfortunately the price for it is waaaay too much to even bother considering as a solution.

– Wayne Molina
Feb 5 ’09 at 16:05

add a comment
 | 

Highly active question. Earn 10 reputation in order to answer this question. The reputation requirement helps protect this question from spam and non-answer activity.

Not the answer you’re looking for? Browse other questions tagged edi or ask your own question.

Blog

This week, #StackOverflowKnows fast planes, math with dates, and code comments

Community working group updates: February 2020

Featured on Meta

TLS 1.0 and TLS 1.1 removal for Stack Exchange services

How do the moderator resignations affect me and the community?

Related

16EDI Format31How to understand an EDI file?9EDI ISA and GS ID Generation1EDI 999 implementation acknowledgment2Efficient EDI parsing into database in C#5How to set up an EDI Server3New to EDI – what is an ASI and whats so great about EDI?1Schema error with Azure BizTalk Services EDI Bridge0EDI and shipping tracking information

Hot Network Questions

What’s the difference between “люблю” and “обожаю”?

Are There Energy Monitoring Smart Plugs That Don’t Compromise my Privacy/Security?

Any tips for photographing a political rally?

Why is late Russian Empire associated with Byzantium while having little in common with it?

Drawing Lines on Differential Equation Slope Field

Were Data and Lore created as a ‘pair’?

How does apt upgrade running programs?

Is there a name for a chess variant where you are allowed to capture your own pieces?

New published work denied brewski robbery

Are the sum of two numbers desired?

What is the word for an animal species which only eats one type of food?

How do Trump’s public statements make DOJ’s job impossible?

How do Aarakocra fly with a backpack?

A childish challenge to generative grammar

I need to examine an 82.7G (!) text file. What can open it?

Why does the same proportion of a radioactive substance decay per time period? (half life)

Why did equal temperament become the standard tuning system for keyboard instruments?

Drawing one-liner

Coupling Theory vs reality

Flexibility over solidity? Defending against 1. e4

Can I use 12-2 wire on a 20amp breaker to power ENTIRE bathroom?

How to access Tridion Config Component in Event System

Detect manual changes to an autogenerated C header

Circle of Points with TikZ

more hot questions

Question feed

Subscribe to RSS

Question feed
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Categories
askquestion

Integrate TortoiseSVN with Redmine

Integrate TortoiseSVN with Redmine

Ask Question

Asked
11 years ago

Active
5 years, 9 months ago

Viewed
10k times

.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}

4

10

I’m trying to integrate Redmine with TortoiseSVN, but I was not able to do that because TSVN always gives me this error:

“There are no issue-tracker providers available.”

I followed these steps:

In my project folder properties, I added ‘bugtraq:url -> http://myweb/../issues/show/%BUGID%’
In Redmine settings, I added SVN in the repository tab, and Redmine showed my repository without any problems.

I’m not sure if there are any missing steps or what I have to do to make the integration.

Or should I look at trac, because it seems more stable and has better support?

svn tortoisesvn trac redmine issue-tracking

share|improve this question

edited May 6 ’14 at 13:45

Chris Forrence

9,22588 gold badges4040 silver badges5656 bronze badges

asked Feb 5 ’09 at 16:03

Mohammed NasmanMohammed Nasman

10.6k66 gold badges4040 silver badges6666 bronze badges

add a comment
 | 

3 Answers
3

active

oldest

votes

9

Slightly more detail on Stefan’s post:

With what you’re trying to do, setting the bugtraq:url alone isn’t enough. You need to either set the ‘bugtraq:message’ property or the ‘bugtraq:logregex’ property as well.
As an example, on our redmine setup we allow the following items in the commit message:

References: refs,references,IssueID
Fixes: fixes,closes,Fixes Bug

So we use a bugtraq:logregex for maximum flexibility of:

([Cc]loses|[Ii]ssue[Ii][Dd]|[Rr]eferences|[Rr]efs|[Ff]ixes(s[Bb]ug)?)s?#(d+)
d+

Which covers all our options.

By doing this, tortoise highlights the part of the commit comment which links into redmine and turns the number into a link which you can click on to go to the actual redmine issue.

The more advanced option is to allow you to choose an open bug directly from redmine. It’s this feature that needs a specific plugin installed on your machine, but as far as I can tell, such a plugin for redmine doesn’t exist, so we’re kind of stuck with the basic option at the moment. When someone writes such a plug-in, and you install it, you’ll then be able to go into “Issue tracker Integration” as you’re currently trying to and things will work fine.

share|improve this answer

answered Feb 9 ’09 at 14:46

Jim TJim T

11.6k55 gold badges2424 silver badges4040 bronze badges

Jim, thanks great info, I want to ask if I could closes an issue in redmine when I commit with TSVN, is that possible?

– Mohammed Nasman
Feb 10 ’09 at 16:07

3

Yes certainly, but only if you use the bugtraq:logregex method. If you go to Administration->Settings->Repositories you’ll find two config options: Referencing keywords and Fixing keywords. Use on of the fixing keywords in your commit log to close your issue, ie: fixes #55

– Jim T
Feb 11 ’09 at 15:50

Thanks Jim, You put me in the right direction, everything is working fine now 🙂

– Mohammed Nasman
Feb 12 ’09 at 16:42

add a comment
 | 

7

Please read the docs.

The error “There are no issue-tracker providers available” means that you have not installed an issue tracker plugin for TSVN.

The bugtraq: properties don’t require a plugin. You can use those without a plugin (but you won’t be able to fetch a list of open issues in the commit dialog).

share|improve this answer

answered Feb 5 ’09 at 17:19

StefanStefan

40.8k99 gold badges6969 silver badges114114 bronze badges

I have already read all these links, but I think the missing part is the COM plug-ins by redmine, right?

– Mohammed Nasman
Feb 10 ’09 at 16:05

Yes, if they don’t provide a COM plugin, you have to write your own 🙂

– Stefan
Feb 10 ’09 at 17:12

Stefan, Can I close an issues from TSvn directly when I made a commit?, also where Can I find a resource to write COM plug-ins for TSVN?

– Mohammed Nasman
Feb 10 ’09 at 19:38

1

Closing issues directly from TSVN will be possible in the next version (and of course if the plugin supports it). You can find docs on how to implement such a COM plugin here: tortoisesvn.tigris.org/svn/tortoisesvn/trunk/contrib/… (username: ‘guest’, leave password empty)

– Stefan
Feb 10 ’09 at 20:44

Thanks Stefan, you have made a great work for all the developers with TSVN 🙂

– Mohammed Nasman
Feb 12 ’09 at 16:43

add a comment
 | 

1

There is an existing Tortoise plugin for Redmine that you can try.

share|improve this answer

edited Dec 21 ’12 at 11:25

Tim Saunders

4,38433 gold badges3131 silver badges4949 bronze badges

answered Jun 10 ’09 at 11:20

Redmine userRedmine user

add a comment
 | 

Your Answer

Thanks for contributing an answer to Stack Overflow!Please be sure to answer the question. Provide details and share your research!But avoid …Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.To learn more, see our tips on writing great answers.

Draft saved
Draft discarded

Sign up or log in

Sign up using Google

Sign up using Facebook

Sign up using Email and Password

Submit

Post as a guest

Name

Email
Required, but never shown

Post Your Answer

Discard

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you’re looking for? Browse other questions tagged svn tortoisesvn trac redmine issue-tracking or ask your own question.

Blog

This week, #StackOverflowKnows fast planes, math with dates, and code comments

Community working group updates: February 2020

Featured on Meta

TLS 1.0 and TLS 1.1 removal for Stack Exchange services

How do the moderator resignations affect me and the community?

Visit chat

Linked

16

Integrating Fogbugz with TortoiseSVN with no URL/Subversion backend

Related

1Does tortoiseSVN support multiple iBugTraqProviders for same user/machine?69An SVN error (200 OK) when checking out from my online repository469TortoiseSVN icons not showing up under Windows 7296How to change users in TortoiseSVN7Internal bug tracking tickets – Redmine, Trac, or JIRA1Redmine doesn’t access VisualSVN repository25SVN Upgrade working copy – TortoiseSVN

Hot Network Questions

Detect manual changes to an autogenerated C header

Were Vietnam veterans spat on?

Linux backup utility for incremental backups

What is this flat metallic component?

Magento2 – How to move cart total below the cart items on checkout page?

Why does the same proportion of a radioactive substance decay per time period? (half life)

Is there a name for a chess variant where you are allowed to capture your own pieces?

How do I know whether an airline seat upgrade was free?

Effectiveness of a glowing hot tungsten sword against medieval era knights?

I hate Valentine’s Day

Is it common for residential foundations from the 1960s to contain asbestos?

Fastest yes in the west

Where to store passport during day trip in foreign country

What would be the best way to capture a Giant?

What does Islam say when dealing with stupid and arrogant parents?

How to change the semantic version number when reverting the last major change

Using polar coordinates to find solutions to equation

Conceptual reason that monadic functors create limits?

Can I use 12-2 wire on a 20amp breaker to power ENTIRE bathroom?

How do I show students the Beauty of Mathematics?

What early middle ages weapons would suit an extremely strong child?

Is it ever neccesary to burn a starter out?

Effect of removing an edge on Hadwiger number

What is the correct way to upgrade pip in stretch debian?

more hot questions

Question feed

Subscribe to RSS

Question feed
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Categories
askquestion

Why does the Standard Numeric Format for percentages include a space?

Why does the Standard Numeric Format for percentages include a space?

Ask Question

Asked
11 years ago

Active
5 years, 1 month ago

Viewed
3k times

.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}

9

The Back Story

I have some decimal values which I am displaying as strings on a web page as part of a larger string. I started off using a Standard Numeric Format String to output this. E.g.

myDecimal.ToString(“P0″)

The 0 after the P tells it I want no decimal places. This works as far as it goes, in that my ouput ends up looking something like:

Calculated as above based on the phased minimum Company contribution rate of 2 %

The Space Problem

I really want to get rid of that space between the number and the percentage sign as in some cases it ends up splitting across lines. And also, I prefer the % to butt up to the number.

Possible Workarounds

1. html / css solution

I could put a <nobr> tag or a <span style=”white-space: nowrap;”> around it. But, that feels awkward, and anyway I prefer the % to butt right up to the number as I think it looks better. It’s how we would write it in reports in this neck of the woods, so it’s how I want it on the web page.

2. Custom format string

I am going to end up using a Custom Numeric Format String, E.g.

myDecimal.ToString(“0%”)

The Question

Is it more common to display percentages with a space between the number and the percentage sign? This would surprise me, but it could be.

Is there a way to tell the Standard Numeric Format String I don’t want the space?

Is there any disadvantage to using a Custom Numeric Format String over a Standard Numeric Format String?

Ok – I admit it, that was more than one question – Extra Credit if you answer them all.

.net number-formatting

share|improve this question

edited Jan 6 ’15 at 8:38

easwee

14.2k99 gold badges5050 silver badges7777 bronze badges

asked Feb 5 ’09 at 16:04

Sam MeldrumSam Meldrum

12.8k66 gold badges3030 silver badges3838 bronze badges

1

Something appears to have changed in Windows 8. With Windows region settings configured to English (Australian), ToString(“P2”) gives “0.00%”, but on a Windows 7 box with same region settings, it returns “0.00 %”. Specifying the Invariant culture causes a space to be included on Win7 and 8.

– David Gardiner
Jun 5 ’14 at 0:46

Thanks, David! This was driving me crazy! I was getting different unit test results (“52.00 %” vs “52.00%”) between my local machine and build servers, and now it makes sense.

– Mike Manard
Apr 25 ’18 at 16:28

add a comment
 | 

3 Answers
3

active

oldest

votes

5

Looking at http://www.nasdaq.com/ or http://finance.yahoo.com/ it seems that the percentage sign right after the number with no space inbetween is common 🙂

Have a look at http://msdn.microsoft.com/en-us/library/system.globalization.numberformatinfo.percentpositivepattern.aspx

It probably depends on culture, the default (invariant) beeing n %

share|improve this answer

answered Feb 5 ’09 at 16:25

AlerisAleris

7,36733 gold badges3131 silver badges4141 bronze badges

Yes it depends on the culture and English has a space although there is an endless discussion about it.

– Dodger
Aug 20 ’19 at 16:19

add a comment
 | 

5

This worked for me:

System.Globalization.CultureInfo newCulture = (System.Globalization.CultureInfo)System.Threading.Thread.CurrentThread.CurrentCulture.Clone();
newCulture.NumberFormat.PercentPositivePattern = 1; // Avoid putting a space between a number and its percentage
System.Threading.Thread.CurrentThread.CurrentCulture = newCulture;

share|improve this answer

edited Dec 2 ’13 at 21:05

answered Dec 2 ’13 at 20:45

user565869user565869

add a comment
 | 

2

To change the default PercentPositivePattern value, you must create a new CultureInfo object and use it instead of the default, which is probably “en-us”. (Alternately, you can specify “en-za” as the culture in your Web.config, but I don’t recommend that for obvious reasons.)

There’s a great post on the ASP Forums explaining how to do all of this. See the code written by the third poster (m0brien). I copied his exact code into my master page’s Page_Load method, so that I don’t have to think about it anymore.

Of course, you could always just do String.Format().Replace(” “, String.Empty), but you’d have to do that throughout your site. Plus, honestly, where’s the fun in that when you could roll up your sleeves and play with your globalization values???

share|improve this answer

answered Mar 27 ’09 at 23:03

DavidDavid

1,58711 gold badge1818 silver badges3434 bronze badges

add a comment
 | 

Your Answer

Thanks for contributing an answer to Stack Overflow!Please be sure to answer the question. Provide details and share your research!But avoid …Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.To learn more, see our tips on writing great answers.

Draft saved
Draft discarded

Sign up or log in

Sign up using Google

Sign up using Facebook

Sign up using Email and Password

Submit

Post as a guest

Name

Email
Required, but never shown

Post Your Answer

Discard

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you’re looking for? Browse other questions tagged .net number-formatting or ask your own question.

Blog

Ben Popper is the worst coder in the world: Something awry with my array

This week, #StackOverflowKnows fast planes, math with dates, and code comments

Featured on Meta

TLS 1.0 and TLS 1.1 removal for Stack Exchange services

How do the moderator resignations affect me and the community?

Linked

1

<decimal>.ToString(“P3”) returns differerent results on Win7 and Windows 10

Related

74Double to string conversion without scientific notation2Combine custom numeric format string with hex format string0Query excel spreadsheet for cell format… (percentage)5How to convert .NET standard format string to Excel format string1Custom numeric decimal format2Regex: change strings of numbers to standard parseable format1.Net – General numeric formatting does not seem to preserve zeros

Hot Network Questions

“electricity was suddenly turned off” or ” electricity suddenly turned off ”

Apocryphal (?) tale of hard drive platter being thrown through a wall?

Why is light with a small wavelength required to have a rectilinear path?

Why is learning mathematics compulsory?

can I use ATF IV instead of Dexron for 2005 toyota camry

Is the actual VMC to IMC transition a challenge (for IFR rated pilot/craft etc) if, say, sudden or unexpected?

New published work denied brewski robbery

On tenure track and department chair wants me to consider leaving

I need to examine an 82.7G (!) text file. What can open it?

Why did the Z80 with 4-bit ALU out-perform the fully 8-bit Intel 8080?

Trumpet type or technique?

When is it appropriate to introduce a new layer of abstraction into a class hierarchy?

What would be the best way to capture a Giant?

How do Trump’s public statements make DOJ’s job impossible?

Avoiding microstrip line to become CPWG

How do coordinate reference systems and projections relate to each other?

Drawing one-liner

Does this design smell bad? Can I pull a pin simultaneously down and up?

Why the focus on American put options in literature?

Effectiveness of a glowing hot tungsten sword against medieval era knights?

How did the Kohanim eat in the Azara?

How do I know whether an airline seat upgrade was free?

Why did equal temperament become the standard tuning system for keyboard instruments?

Coupling Theory vs reality

more hot questions

Question feed

Subscribe to RSS

Question feed
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

default

Categories
askquestion

How to retrieve metadata for return values of an sql server stored procedure

How to retrieve metadata for return values of an sql server stored procedure

Ask Question

Asked
11 years ago

Active
1 year ago

Viewed
3k times

.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}

1

1

I want to analyze an SQL Server stored procedure from .NET code to retrieve metadata for the data/columns it returns (not OUTPUT parameters). Like when you drag/drop a sp on a DataSet i VisualStudio and it automatically generates columns. It could be useful for me for some code generation I’m testing out.

The procedures contains simple select statements like SELECT a,b FROM c and I’d like to get metadata about a and b.

.net sql-server code-generation metadata

share|improve this question

edited Jun 1 ’09 at 18:51

GEOCHET

20k1515 gold badges6868 silver badges9595 bronze badges

asked Feb 5 ’09 at 16:05

Johan DanforthJohan Danforth

3,89944 gold badges2929 silver badges3434 bronze badges

add a comment
 | 

2 Answers
2

active

oldest

votes

2

You can use SET FMTONLY ON (and execute it) – but this is a bit hit-n-miss. It doesn’t cover all scenarios (branches, etc) – and can still execute some code (extended stored procedures etc).

Alternatively – use table-valued-functions (udfs) – they have much richer/more-formal metadata.

share|improve this answer

edited Feb 4 ’19 at 11:50

AeroX

3,04222 gold badges2020 silver badges3737 bronze badges

answered Feb 5 ’09 at 16:09

Marc Gravell♦Marc Gravell

848k220220 gold badges22842284 silver badges26622662 bronze badges

add a comment
 | 

1

In SQL Server 2012 /Denali you can use sys.dm_exec_describe_first_result_set_for_object.

This returns information about the first result set in the procedure (as long as this result set is returned by all code paths)

share|improve this answer

edited Oct 14 ’11 at 20:23

answered Apr 2 ’11 at 23:42

Martin SmithMartin Smith

374k6969 gold badges634634 silver badges735735 bronze badges

add a comment
 | 

Your Answer

Thanks for contributing an answer to Stack Overflow!Please be sure to answer the question. Provide details and share your research!But avoid …Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.To learn more, see our tips on writing great answers.

Draft saved
Draft discarded

Sign up or log in

Sign up using Google

Sign up using Facebook

Sign up using Email and Password

Submit

Post as a guest

Name

Email
Required, but never shown

Post Your Answer

Discard

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you’re looking for? Browse other questions tagged .net sql-server code-generation metadata or ask your own question.

Blog

Ben Popper is the worst coder in the world: Something awry with my array

This week, #StackOverflowKnows fast planes, math with dates, and code comments

Featured on Meta

TLS 1.0 and TLS 1.1 removal for Stack Exchange services

How do the moderator resignations affect me and the community?

Linked

2

Sql Server – Any way to find which stored procedures return sets and which not?

Related

2700Add a column with a default value to an existing table in SQL Server1736How to return only the Date from a SQL Server DateTime datatype1816How to check if a column exists in a SQL Server table?1867How to concatenate text from multiple rows into a single text string in SQL server?250SQL Server: Query fast, but slow from procedure1545Insert results of a stored procedure into a temporary table580What is the best way to auto-generate INSERT statements for a SQL Server table?815Function vs. Stored Procedure in SQL Server3608How do I UPDATE from a SELECT in SQL Server?779Search text in stored procedure in SQL Server

Hot Network Questions

How to disconnect air conditioner lines from outdoor unit?

How do I know whether an airline seat upgrade was free?

What is right way to setup King & Queen In the beginning of game?

What is the word for an animal species which only eats one type of food?

Detect manual changes to an autogenerated C header

Why do goblins never form societies bigger than about 500 members?

How does apt upgrade running programs?

How do I create a 3×3 matrix of Images with a letter at the beginning of each line?

How much can I get away with making management happy but irritating co-workers?

Can you Rappel with an Old Climbing Rope?

New published work denied brewski robbery

Am I understanding buffering capacity against strong acid/base correctly?

Were Vietnam veterans spat on?

Linux backup utility for incremental backups

What would be the best way to capture a Giant?

Are the sum of two numbers desired?

Drawing one-liner

Is the actual VMC to IMC transition a challenge (for IFR rated pilot/craft etc) if, say, sudden or unexpected?

Why isn’t “Star Trek: Picard” shot in wide-screen 16:9?

On tenure track and department chair wants me to consider leaving

How to batch rotate image to make them all landscape?

Can I use 12-2 wire on a 20amp breaker to power ENTIRE bathroom?

Why is learning mathematics compulsory?

I’m not able to delete -> in {{x -> a}, {x -> b}, {x -> c, x -> d}}

more hot questions

Question feed

Subscribe to RSS

Question feed
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

lang-sql

Categories
askquestion

How to transfer java array to javaScript array using jsp?

How to transfer java array to javaScript array using jsp?

Ask Question

Asked
11 years ago

Active
4 years, 4 months ago

Viewed
74k times

.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}

9

4

I have a list of strings on my server which I am trying to get to the client in the form of an array. The code I am attempting to use is the following:

Within the jsp I have a List<String> column

I am attempting the following code:

<%int j = 0; %>
for(var i = 0; i < <%=columns.size()%>; i++)
{
colArray[i] = “<%=columns.get(j++)%>”;
}

This code simply returns the first element in the columns list for every element in the colArray.

I have also tried:

colArray = <%=columns.toArray()%>;

which does not work either.
I feel like I am making a little mistake somewhere and am just not seeing it. Is what I am trying to do possible in the way that I am attempting?

Thanks.

java javascript arrays jsp

share|improve this question

edited May 11 ’11 at 14:49

Alex K.

149k2424 gold badges225225 silver badges254254 bronze badges

asked Feb 5 ’09 at 16:06

kgradkgrad

4,14277 gold badges3030 silver badges5656 bronze badges

add a comment
 | 

6 Answers
6

active

oldest

votes

14

You’re getting the JSP code that is executed on the server mixed up with the JavaScript code that’s executed on the client. The snippet <%=columns.get(j++)%> is executed once, on the server, and the JavaScript loop around it is irrelevant at this point. When it arrives the the client, the loop’s body just says colArray[i] = “first entry”; which of course puts the same string into every element of the array.

What you need to do instead is to have a loop execute on the server, like this:

<% for (int i=0; i<columns.size(); i++) { %>
colArray[<%= i %>] = “<%= columns.get(i) %>”;
<% } %>

My JSP skills are rusty, and the syntax may be different, but I hope you get the idea.

Edit: As was pointed out in the comments, you need to be VERY careful about escaping anything in those Strings that could cause them to be interpreted as JavaScript code (most prominently quotation marks) – especially if they contain user-generated content. Otherwise you’re leaving your app wide open to Cross-site scripting and Cross-site request forgery attacks.

share|improve this answer

edited Feb 5 ’09 at 16:51

answered Feb 5 ’09 at 16:19

Michael BorgwardtMichael Borgwardt

312k7171 gold badges448448 silver badges681681 bronze badges

This will not work if the strings contain characters such as double-quote, backslash or newline. Such characters will need to be escaped.

– Luke Woodward
Feb 5 ’09 at 16:42

I’d also add a semicolon to the end of the second line.

– Luke Woodward
Feb 5 ’09 at 16:43

add a comment
 | 

6

Try using JSON (Javascript object notation) it’d be quite simple to encode the array and decode it on javascript

check it out here

http://www.json.org/java/index.html

share|improve this answer

answered Feb 5 ’09 at 16:49

perrohunterperrohunter

2,86577 gold badges3131 silver badges5151 bronze badges

add a comment
 | 

5

Once the JavaScript reaches the client, the server code has stopped executing. The server code does not execute “in parallel” with the client code.

You have to build the entire JavaScript initialization in Java and send it, complete and executable, to the client:

<%
StringBuffer values = new StringBuffer();
for (int i = 0; i < columns.size(); ++i) {
if (values.length() > 0) {
values.append(‘,’);
}
values.append(‘”‘).append(columns.get(i)).append(‘”‘);
}
%>
<script type=”text/javascript”>
var colArray = [ <%= values.toString() %> ];
</script>

That is just one way to do it, you can also build the output “on the fly” by embedding the server code inside the [ and ]. I used this example to try to demonstrate the separation between building the string that comprises the client-side JavaScript and outputting that to the browser.

share|improve this answer

answered Feb 5 ’09 at 16:19

Grant WagnerGrant Wagner

21.6k66 gold badges4949 silver badges6060 bronze badges

add a comment
 | 

3

Exp Language:

colArray = ${columns}

share|improve this answer

edited Sep 17 ’12 at 13:32

j0k

21.1k1414 gold badges7171 silver badges8181 bronze badges

answered Sep 17 ’12 at 13:05

fmannafmanna

3111 bronze badge

it’s useful for list of numbers, strings are not surrounded by “”

– Glapa
Oct 8 ’19 at 22:41

add a comment
 | 

3

For me this solution has worked. First of all You should make a JSONArray and use it’s toJSONString() method. This method converts the list to JSON text. The result of it is a JSON array.

<%
List<String> exampleList = new ArrayList<>();
exampleList.add(“Apple”);
exampleList.add(“Orange”);
exampleList.add(“Lemon”);

JSONArray fruitList = new JSONArray();
fruitList.addAll(exampleList);
%>

In your JSP page you should invoke the toJSONString() method of the list, and pass the JSON text to a JavaScript array.

<script type=”text/javascript”> var fruitArray = <%= fruitList.toJSONString() %>;</script>

(Optionally You could make a simple getter method for the list. In case if you only instantiate the JAVA class – which has the list field – int the JSP page.)

share|improve this answer

answered Oct 8 ’15 at 14:24

F3R1F3R1

37311 gold badge33 silver badges1010 bronze badges

add a comment
 | 

2

The solutions posted above didn’t work in my case, I needed an extra Javascript variable to do the transference:

var codesJS=new Array();
<% String[] codes=(String[])request.getAttribute(“codes”);
if(codes!=null){
for(int i=0; i<codes.length; i++){ %>
var code='<%= codes[i] %>’; //–> without this doesnt work
codesJS[<%= i %>]=code;
<%}
}%>

share|improve this answer

edited Jun 5 ’13 at 21:00

Aboutblank

66722 gold badges1414 silver badges3030 bronze badges

answered Jun 5 ’13 at 20:34

José AlmeidaJosé Almeida

2111 bronze badge

How the “i” variable passes from js to java ?

– serj
Oct 2 ’15 at 10:05

add a comment
 | 

Your Answer

Thanks for contributing an answer to Stack Overflow!Please be sure to answer the question. Provide details and share your research!But avoid …Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.To learn more, see our tips on writing great answers.

Draft saved
Draft discarded

Sign up or log in

Sign up using Google

Sign up using Facebook

Sign up using Email and Password

Submit

Post as a guest

Name

Email
Required, but never shown

Post Your Answer

Discard

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you’re looking for? Browse other questions tagged java javascript arrays jsp or ask your own question.

Blog

Ben Popper is the worst coder in the world: Something awry with my array

This week, #StackOverflowKnows fast planes, math with dates, and code comments

Featured on Meta

TLS 1.0 and TLS 1.1 removal for Stack Exchange services

How do the moderator resignations affect me and the community?

Linked

-1

Pass an array from .jsp file to .js file

-2

How to convert a list of java objects which came on JSP page as Spring MVC model to javascript collection to iterate them?

0

How could I get ModelAndView object in js by using for loop?

0

Pre-populating jQuery Autocomplete with data

-1

Servlet array to javascript variable

Related

7640How do JavaScript closures work?5959How do I remove a property from a JavaScript object?3879How do I check if an array includes a value in JavaScript?5022How do I include a JavaScript file in another JavaScript file?7431What does “use strict” do in JavaScript, and what is the reasoning behind it?7429How to check whether a string contains a substring in JavaScript?3030Loop through an array in JavaScript7897How do I remove a particular element from an array in JavaScript?4545For-each over an array in JavaScript?24083Why is processing a sorted array faster than processing an unsorted array?

Hot Network Questions

Why is iso-octane different from other iso-s?

Three way switch with two common wires?

Ways to append text to a file

What this Dog Grill Grilling Machine called in everyday spoken english?

How do Trump’s public statements make DOJ’s job impossible?

Why did the Z80 with 4-bit ALU out-perform the fully 8-bit Intel 8080?

how one column can be large in a table

Are the sum of two numbers desired?

How to change the semantic version number when reverting the last major change

When should a company hire developers versus outsourcing them?

First non-elected person in line of succession for British Government or Parliament?

How do I create a 3×3 matrix of Images with a letter at the beginning of each line?

Why is late Russian Empire associated with Byzantium while having little in common with it?

Book Chapter Decoration

How do I sail rafts in Breath of the Wild?

Since the caster of the Zone of Truth spell knows whether a creature failed the save, can they use it to detect hidden/invisible creatures?

Can you Rappel with an Old Climbing Rope?

How to batch rotate image to make them all landscape?

Where to store passport during day trip in foreign country

How does apt upgrade running programs?

Am I understanding buffering capacity against strong acid/base correctly?

Trumpet type or technique?

If a portal scroll is cheap and easily available why they are not used when one’s life is in peril?

Difference between Intel 8087 and 8089 opcodes

more hot questions

Question feed

Subscribe to RSS

Question feed
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

default

Categories
askquestion

Why does RewriteRule ^page/?$ page.php [L] match site.com/page//

Why does RewriteRule ^page/?$ page.php [L] match site.com/page//

Ask Question

Asked
11 years ago

Active
11 years ago

Viewed
1k times

.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}

1

1

RewriteEngine on
RewriteRule ^page/?$ page.php [L]

This ends up matching the url www.site.com/page// but internally it acts differently than www.site.com/page/ because the stylesheets and images no longer appear properly. Am I doing something wrong or is this just something I need to deal with if I don’t want to go through a lot of trouble?

To me it looks like it should only match www.site.com/page or www.site.com/page/

apache .htaccess mod-rewrite

share|improve this question

edited Jan 24 ’09 at 18:53

Fabian Steeg

41k66 gold badges7676 silver badges109109 bronze badges

asked Jan 24 ’09 at 18:29

Joe PhillipsJoe Phillips

41.4k2424 gold badges8585 silver badges143143 bronze badges

add a comment
 | 

1 Answer
1

active

oldest

votes

4

Apache strips the empty path segment. So /path// is treated as /path/. But your browser doesn’t so relative URLs are resolved using /path//.

If you want to remove the multiple slashes, you can use the following rule:

RewriteCond %{THE_REQUEST} ^[A-Z]+ /(([^/ ]+/)*)/+([^ ]*)
RewriteRule ^ /%1%3 [L,R=301]

Explaination

Despite Apache removes empty path segments internal, the THE_REQUEST environment variable (holding the HTTP request line) stays untouched. So we can use this value to check for multiple slashes.

^[A-Z]+ / matches the request method, the following space and the first slash character of the URI path.
(([^/ ]+/)*) matches all following non-empty path segments (foo/, foo/bar/, foo/bar/baz/, etc.) or nothing, if there are none.
/+ matches the empty path segments as the character before this slash is always another slash (see the expressions before).
([^ ]*) matches the rest of the URI (that may contain further empty path segments).

Example: Let’s say we request http://example.com/foo/bar//baz, the request line will look like this:

GET /foo/bar//baz HTTP/1.1

The pattern would then match as follows:

0: GET /foo/bar//baz
1: foo/bar/
2: bar/
3: baz

So the requested path /foo/bar//baz would be redirected to /foo/bar/baz (/%1%3).

share|improve this answer

edited Jan 24 ’09 at 19:21

answered Jan 24 ’09 at 18:33

GumboGumbo

550k9595 gold badges704704 silver badges791791 bronze badges

Brilliant. Can you possibly explain a little bit what each of those lines do?

– Joe Phillips
Jan 24 ’09 at 18:37

add a comment
 | 

Your Answer

Thanks for contributing an answer to Stack Overflow!Please be sure to answer the question. Provide details and share your research!But avoid …Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.To learn more, see our tips on writing great answers.

Draft saved
Draft discarded

Sign up or log in

Sign up using Google

Sign up using Facebook

Sign up using Email and Password

Submit

Post as a guest

Name

Email
Required, but never shown

Post Your Answer

Discard

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you’re looking for? Browse other questions tagged apache .htaccess mod-rewrite or ask your own question.

Blog

Ben Popper is the worst coder in the world: Something awry with my array

This week, #StackOverflowKnows fast planes, math with dates, and code comments

Featured on Meta

TLS 1.0 and TLS 1.1 removal for Stack Exchange services

How do the moderator resignations affect me and the community?

Related

0MOD_REWRITE but not in sub directories0Redirect all urls with parameters to an specific page with same parameters2.htaccess rewrite without it affecting relative image/css/js URLs?9htaccess RewriteRule page with query string0If url ends with double dash, want to rewrite(Apache)0Using RewriteRule to write URL from page/unique_id to page.php?id=unique_id0htaccess – Stop processing0Using RewriteRule shows apache folder navigation or 404, why?0Apache HTTPD 2.4 URL Rewrite Rules1Multiple languages + Htaccess

Hot Network Questions

Find common substring that starts a set of strings

Sound driver for DOS or Windows 3.x that used the PC speaker?

Is firing for unionizing legal? (The Office, S2E15)

Paint 21 Squares of a 7×7 Board Without Forming a Rectangle

My approach to sorting algorithm

What are the most powerful airplanes that ever flew?

How do I sail rafts in Breath of the Wild?

Providing the spymaster with cues for clues in Codenames

Does this design smell bad? Can I pull a pin simultaneously down and up?

I’m not able to delete -> in {{x -> a}, {x -> b}, {x -> c,x->d}}

Ways to append text to a file

Why do goblins never form societies bigger than about 500 members?

The “Chaos Game” as a particular series of i.i.d. random variables

Copying & pasting multiple commands to Minecraft terminal

Why did the Z80 with 4-bit ALU out-perform the fully 8-bit Intel 8080?

How do Aarakocra fly with a backpack?

Is there any material which cannot be cut by a lightsaber?

Can a Battle Smith’s artificer Steel Defender be imbued with an infusion?

Since the caster of the Zone of Truth spell knows whether a creature failed the save, can they use it to detect hidden/invisible creatures?

Can you Rappel with an Old Climbing Rope?

Taller than normal parallel symbol ||

What this Dog Grill Grilling Machine called in everyday spoken english?

How to batch rotate image to make them all landscape?

How did Canada come to be the robotic arm people?

more hot questions

Question feed

Subscribe to RSS

Question feed
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.