Throw a message box when a special character is found...
Again,, thought this would be pretty easy just looking to throw a message box if a special character is found..
Using this starter code, it works if only one special character is used, but with multiple characters, does not throw message box.
Example ------- > : <---------Works
Example -------> :::: <---------Does not work
if(":/~/^\*$/".ToCharArray() -Contains $Sub)
[System.Windows.Forms.MessageBox]::Show("Special Characters are not supported", "Informational")
return
Djoe
Assuming that ":/~/^\*$/" is the set of special characters you want to filter out, and $Sub is the string you're testing, I'd do that one of two ways. I'd either use a regular expression, or use the String.IndexOfAny() method. (Looking for single
characters, either one works fine, but regular expressions can be made to work with much more complicated validation patterns as well.)
$Sub = "Evil \ string."
$specialCharacters = ":/~/^\*$/".ToCharArray()
if ($Sub.IndexOfAny($specialCharacters) -ge 0)
throw "Bad, scary characters!"
# Using regex:
$specialCharacterPattern = '[:/~^\\*$]'
if ($Sub -match $specialCharacterPattern)
throw "Bad, scary characters!"
Similar Messages
-
Blank Message Box when Saving a report in InfoView
Post Author: Jmusser
CA Forum: Administration
I'm getting a blank message box when I try to save any report from any folder in infoview for users I have setup in the following Group. Has anyone run into this on know what is set wrong in security?
We are running BOXI2. I have setup a custom security group for InfoView Users that grants rights to the following in Home > BusinessObjects Enterprise Applications > InfoView >- all other rights are not specified
Log on to InfoView and view this object in the CMC
Edit this object
Search for simple text
Do an advanced search
Filter object listing by object type
View the favorites folder
View the Inbox
Create categories
Assign categories
Send documents
Create folders
At the top level folder I have permissions granted as
General
Add objects to the folder
Denied
View objects
Granted
Granted
Edit objects
Granted
Granted
Modify the rights users have to objects
Denied
Schedule the document to run
Denied
Delete objects
Denied
Define server groups to process jobs
Denied
Delete instances
Denied
Copy objects to another folder
Granted
Granted
Schedule to destinations
Denied
View document instances
Granted
Granted
Pause and Resume document instances
Denied
Securely modify rights users have to objects.
Denied
Reschedule instances
Denied
Schedule on behalf of other users
Denied
Allow discussion threads
Granted
Granted
View objects that the user owns
Granted
Granted
Edit objects that the user owns
Granted
Granted
Modify the rights users have to objects that the user owns
Denied
Delete objects that the user owns
Granted
Granted
Delete instances that the user owns
Granted
Granted
View document instances that the user owns
Granted
Granted
Pause and Resume document instances that the user owns
Granted
Granted
Securely modify rights users have to objects that the user owns.
Denied
Reschedule instances that the user owns
Denied
Desktop Intelligence
Refresh the report's data
Granted
Granted
Refresh List of Values
Granted
Granted
Use Lists of Values
Granted
Granted
View SQL
Denied
Export the report's data
Granted
Granted
Download files associated with the object
Granted
Granted
Desktop Intelligence Add in
Download files associated with the object
Granted
Granted
Desktop Intelligence Template
Download files associated with the object
Granted
Granted
Report
Print the report's data
Granted
Granted
Refresh the report's data
Granted
Granted
Export the report's data
Granted
Granted
Download files associated with the report
Granted
Granted
Web Intelligence Document
Refresh the report's data
Granted
Granted
Edit Query
Denied
Refresh List of Values
Granted
Granted
Use Lists of Values
Granted
Granted
View SQL
Denied
Export the report's data
Granted
Granted
Download files associated with the object
Granted
GrantedTry This..
1. Open the crystal client on your local machine and import that particular report.
2. Do Database -> Verify Database. Then refresh the report on your PC and make sure that it returns data as expected.
3. Export it back to repository and try scheduling it again. You can verify through CMC for Crystal Reports under " Database Configuration" property to make sure it points to the right ODBC.
Let us know. -
How can i display a message box when error comes in jsp?
Hi,
i need to display a message box whenever an error comes in my jsp. Actually my appln is that i am creating a bar chart using one applet by taking data from the database. When a user does not select a number data for y axis, now in the centre of the web page one java error is coming. "not in number format". it is looking very odd.
so i want to display the error in a message box whenever it comes as above. pls help me how can i do the same...
Regds,
Abhi...Hi,
thanx for ur response. so u mean to say that i can
display the errors in the web page itself instead of
displaying as a message box?Either way. You can have the JSP send a message to the applet to display a message box. Or you can just have the JSP do it. or you can have the applet detremine if the JSP would produce an error and then display the message it would display.
>
actually i am using servlets. jsp pages are used only
as the front end. all the background works are doing
in servlet only.It should be the same in any case. Is the applet connecting to the JSP pages or are you having the browser do it?
>
pls get back... -
Hi,
We are working on a .net windows service program. In one code path, we will create an oracle oledb connection to an oracle database using ado.net provider over oledb.
We use oracle oledb provider (11g, 64bit) but we found when the path was configured incorrectly, a message box of "OraOLEDBpus11.dll is missing" would pop up. Since it's a windows service, the dialog box can't be seen and thus blocked the whole process.
We would like to know if it is possible to suppress this message box. And how can we suppress it?
Dialog box looks like:
Oracle Provider for OLE DB
OraOLEDBpus11.dll: The specified module could not be found.
OK
Some of the call stack are listed here:
00:U 000000001ca6a258 000000007736933a user32!ZwUserWaitMessage+0xa
01:U 000000001ca6a260 0000000077374bc4 user32!DialogBox2+0x274
02:U 000000001ca6a2f0 0000000077374edd user32!InternalDialogBox+0x135
03:U 000000001ca6a350 00000000773c2920 user32!SoftModalMessageBox+0x9b4
04:U 000000001ca6a480 00000000773c1c15 user32!MessageBoxWorker+0x31d
05:U 000000001ca6a640 00000000773c146b user32!MessageBoxTimeoutW+0xb3
06:U 000000001ca6a710 00000000773c1616 user32!MessageBoxTimeoutA+0x18a
07:U 000000001ca6a780 00000000773c1306 user32!MessageBoxA+0x4e
08:U 000000001ca6a7c0 0000000180032099 OraOLEDB11+0x32099
09:U 000000001ca6a9a0 000000018005a45a OraOLEDB11!DllCanUnloadNow+0x60a
0a:U 000000001ca6a9e0 000000018006a0ad OraOLEDB11!DllUnregisterServer+0x9ded
0b:U 000000001ca6aa20 00000000775ab108 ntdll!LdrpRunInitializeRoutines+0x1fe
0c:U 000000001ca6abf0 000000007759787a ntdll!LdrpLoadDll+0x231
0d:U 000000001ca6ae00 0000000077597b5e ntdll!LdrLoadDll+0x9a
0e:U 000000001ca6ae70 000007fefd6e9059 KERNELBASE!LoadLibraryExW+0x22e
0f:U 000000001ca6aee0 000007feff164e42 ole32!LoadLibraryWithLogging+0x32
10:U 000000001ca6af30 000007feff164db7 ole32!CClassCache::CDllPathEntry::LoadDll+0x5b
11:U 000000001ca6af70 000007feff164bbc ole32!CClassCache::CDllPathEntry::Create_rl+0x4c
12:U 000000001ca6afd0 000007feff161ca1 ole32!CClassCache::CClassEntry::CreateDllClassEntry_rl+0xe1
13:U 000000001ca6b290 000007feff161b73 ole32!CClassCache::GetClassObjectActivator+0x5ab
14:U 000000001ca6b3e0 000007feff162425 ole32!CClassCache::GetClassObject+0x45
15:U 000000001ca6b450 000007feff18a53a ole32!CServerContextActivator::GetClassObject+0x1fc
16:U 000000001ca6b540 000007feff18a3a2 ole32!ActivationPropertiesIn::DelegateGetClassObject+0x62
17:U 000000001ca6b5a0 000007feff18a5fc ole32!CApartmentActivator::GetClassObject+0x4c
18:U 000000001ca6b5e0 000007feff18a645 ole32!CProcessActivator::GCOCallback+0x31
19:U 000000001ca6b610 000007feff186e83 ole32!CProcessActivator::AttemptActivation+0x33
1a:U 000000001ca6b650 000007feff186e17 ole32!CProcessActivator::ActivateByContext+0x7f
1b:U 000000001ca6b6e0 000007feff18a6d0 ole32!CProcessActivator::GetClassObject+0x70
1c:U 000000001ca6b720 000007feff18a3a2 ole32!ActivationPropertiesIn::DelegateGetClassObject+0x62
1d:U 000000001ca6b780 000007feff18a30c ole32!CClientContextActivator::GetClassObject+0xcc
1e:U 000000001ca6ba10 000007feff18a3a2 ole32!ActivationPropertiesIn::DelegateGetClassObject+0x62
1f:U 000000001ca6ba70 000007feff18a176 ole32!ICoGetClassObject+0x3d6
20:U 000000001ca6c590 000007feff183057 ole32!CComActivator::DoGetClassObject+0x1c7
21:U 000000001ca6c660 000007feff182e67 ole32!CoGetClassObject+0x4f
22:U 000000001ca6c6c0 000007fedd30317f oledb32!CCMProviderInfo::Initialize+0x5f
23:U 000000001ca6c710 000007fedd302eb5 oledb32!CCMProviderInfoManager::CreateProviderInfo+0x2a7
24:U 000000001ca6c8a0 000007fedd302cf8 oledb32!CCMProviderInfoManager::GetProviderInfoFromCLSID+0x9a
25:U 000000001ca6c930 000007fedd302c54 oledb32!CCMProviderInfoManager::GetProviderInfoFromInitString+0x2b4
26:U 000000001ca6c9b0 000007fedd302a68 oledb32!InitialGetDataSource+0x160
27:U 000000001ca6ca60 000007fedd302993 oledb32!GetDataSource+0x797
28:U 000000001ca6cc80 000007fedd2f1eca oledb32!CMSDAInitialize::GetDataSource+0x1d1
29:U 000000001ca6cce0 000007fedd35cb43 oledb32!CDSLObject::GetDataSource+0x63
OraOLEDB11.dll version:
Product version 11.2.0.1.0
File version 11.2.0.1
Thanks,
XuanHi
register dll
C:\windows\syswow64\regsvr32.exe C:\oracle\bin\oraoledb11.dll
copy file oraoledbpus11.dll and oraoledb11us.dll to \windows\system32\
Thanks, Darek -
Apple script for Message box when Mail app Compose Window Opens
Hi there
I'm trying to make mail app remind me to choose the right emaill address to send from since I have several email addresses. Is there a way I can make or write an apple script for a message box to pop up whenever mail app's compose window opens up.
I can do for the case when I actally click the compose button when I'm on mail app by using UI scripting. But when it comes to hyperlinks which opens up the compose window, it fails.
I just want a script to see whether the compose window is open and if open pop up a message box.
Thanks
Best regards
Zam Shabeer ThahirTaoChitpol wrote:
By the way, the problem happens with the account of MS Exchange service, I don't know if this is the cause of the problem.
I think yes. The encoding is being corrupted somewhere, probably Exchange. There is nothing you can change on the iPad other than the OS languagel, to see if that helps. You can also tell Apple at
http://www.apple.com/feedback/ -
How to create a message box when click on Panel
Dear All
I would like to create a message box to show my data when I
click or mouseOn the panel that generate automatically from
arrayCollection and the Data that I would like to show in the
message box is in that arrayCollection too.
If you know how can I do for this thing Could please tell
me!!
this is my CODE for generate a list of panel BY
arrayCollection
<mx:List id="pa4" width="99" height="293"
dataProvider="{sectorTemp1}">
<mx:itemRenderer>
<mx:Component>
<mx:Panel width="100" height="30" title="{data.company}"
backgroundColor="{data.indicatorColor}" />
</mx:Component>
</mx:itemRenderer>
</mx:List>Sometimes the drivers do not give all the true functionality of the instrument. I am assuming this pop up is possible, so if the driver doesn't offer the functionality you might have to go to the instruments full instruction set and find the right commands and make a driver for that command.
For example, the driver for the small display might be 'upgradable' to give the pop up you are looking for.
I saw some other posts ( as far back as 2007) on this instrument, so maybe there is already somthing like this on the board.
Mark Ramsdale -
if Firefox is already running and click on any link in Word, Excel, Outlook, etc. A message box pops up and I have to hit OK to close it.
"firefox is already running, but not reponding. To open a new window, you must first close the existing firefox process, or restart your system"if Firefox is already running and click on any link in Word, Excel, Outlook, etc. A message box pops up and I have to hit OK to close it.
"firefox is already running, but not reponding. To open a new window, you must first close the existing firefox process, or restart your system" -
Get user name - web services throws error if a name has special character
I am calling UserProfileService.asmx web service and using GetUserPropertyByAccountName. The method works for almost everyone except for those who has special characters in the Preferred Name. How do I fix this? We are having serious production issues and
would like to know how to fix the issue.
User: domain\aberg returns name as the name does not have any special characters. Arthur Berg
User: domain\jobill returns following error because this use has a dash in the last name. Joe O-Bill
User: domain\mobrien returns following error because this use has a dash in the last name. Mark O'Brien
<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>A user with the account name DOMAIN\jobill could not be found. ---> An error was encountered while retrieving the user profile.</faultstring>
<detail>
<ErrorCode xmlns="http://microsoft.com/webservices/SharePointPortalServer/UserProfileService">UserCannotBeFound</ErrorCode>
<ErrorMessage xmlns="http://microsoft.com/webservices/SharePointPortalServer/UserProfileService">An error was encountered while retrieving the user profile.</ErrorMessage>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
I am using codeplex tool "web service studio 2.0" to verify this.I have NO clue what is going on. When I go to user profile from Central Admin the user account is domainxp.net\username. But when I pull up the user using address bar (say in edit form) I see domain\usename. Could this be confusing the workflow which is
calling the web services?
I ran the following powershell and after few minutes it starting to resolve the user name without any errors. I like to know what is going on here. Problem is solved for now but I wont be surprise if I see the same problem after doing a Full AD sync.
$adUser = "domain\user"
$siteCollection = "http://local.site/sales"
Set-SPUser -Identity $adUser -Web $siteCollection -SyncFromAD
Thanks
Brooke -
Can't copy text inside stop message box when recording action
Hi everybody, I'm creating a few PS actions and I wrote a piece of text that I want to show by a "insert stop" rule at the begining of every action.
Problem is this: when I copy the text (from TextEdit) and go to the dialogue box on Photoshop, text simply doesn't paste. If i have to write it on every single action it will be a neverending work!
Am I doing anything wrong!?putaaaa wrote:
Hello, my version of PS is CS 5.1 and operating system is OSX 10.7.5, pretty actual I think! and I was using Cmd+C on source and then Cmd+V on PS, of course.
Oh! wait! I have find the problem, post here if usefull for someone getting same fail as me. Problem is that you have to save TextEdit file (or whatever other software) as a "plain text" or "normal text" which means "with no format". By default, TextEdit saves files as "rich text format" files, which Photoshop simply doesn't read.
That's strange because formatted text can be copied in TextPad then pasted into the Action editor in CS5.1 and CS6 on my OS X 10.6.8 machine. Here's screenshots with CS5.1. -
Removing any and all message boxes when closing a extended PDF in Reader
Hello all,
We have a requirement to have a form Reader Extended BUT when closing the form to NOT have any message windows pop up asking the user if they want to save the form, etc.
Any way to do this?
Rick Kuhlmann
Tech-ProThen you need to make Adobe Reader the default app for opening PDF files, instead of FireFox. I think FireFox just started doing this, and it's causing some confusion.
As well as the normal Windows way of changing default app, which is not as well known as it should be, you should be able to use Adobe Reader. In Edit > Preferences look in the General section and see if there is a button "Select Default PDF Handler". -
How to reduce the size of the message box when appearing on the panel?
When a user display message appearing on the panel,it overlaps my graphs due to its big size.How can I reduce its size or locate it at the corner of the panel?
Can you post an example? If you're referring to the User Message or User Prompt or the other dialogs, I'm not sure if the hooks are there to control where the dialog appears. Someone else might know different.
“A child of five could understand this. Send someone to fetch a child of five.”
― Groucho Marx -
In some scenarios HL7 message is coming with special character ‘’ and HL7 dis-assembler escaping this character with “”. But while sending out (pass thru pipeline but orchestration trying to persist here at last sendshape.) from orchestration
this message failing with the error “Exception occurred when persisting state to the database.”
As per the analysis , Orchestration is unable to convert to xml document from a
XLANGMessage because of this special character. We have tried to call custom .net class with following code and its failing here as well (I think orchestration also trying to do same way and failing with the message and failing with same error.).
public void ProcessRequest(XLANGMessage reqMessage)
XmlDocument xmlDocument = (XmlDocument)reqMessage[0].RetrieveAs(typeof(XmlDocument)); It is failing here with the error
“ ', hexadecimal value 0x10, is an invalid character. Line 1, position 1865. “
Note : Please find the special character in the attachment circled in red color.Hi ,
Please find the xml and the screenshot.
<OBX_ObservationResult>
<OBX_1_SetIdObx>3</OBX_1_SetIdObx>
<OBX_2_ValueType>TX</OBX_2_ValueType>
<OBX_3_ObservationIdentifier>
<CE_0_Identifier>P.112</CE_0_Identifier>
<CE_1_Text>Where pt. will be transported to \T\ where famly can wait:</CE_1_Text>
</OBX_3_ObservationIdentifier>
<OBX_4_ObservationSubId />
<OBX_5_ObservationValue>Y</OBX_5_ObservationValue>
<OBX_6_Units>
<CE_0_Identifier />
</OBX_6_Units>
<OBX_7_ReferencesRange />
<OBX_8_AbnormalFlags />
<OBX_9_Probability />
<OBX_10_NatureOfAbnormalTest />
<OBX_11_ObservationResultStatus>N</OBX_11_ObservationResultStatus>
</OBX_ObservationResult> -
Hi
Is there a way i can read my json file stored in my folder in the message box i have tried the with the code below but keeps getting error
//Message box code
List<string> strings = new List<string>() { "Friday 16Th 6PM", "Sunday 18TH 10AM & 7PM", "Wednesday 21st 6PM", "Friday 23RD 6PM", "Sunday 25th 10AM & 7PM", "Wednesday
28th 6PM", "Friday 30th 6PM", };
public ListPicker()
InitializeComponent();
lbx.ItemsSource = strings;
lbx.SelectionChanged += lbx_SelectionChanged;
void lbx_SelectionChanged(object sender, SelectionChangedEventArgs e)
value = lbx.SelectedIndex;
switch (value)
case 0:MessageBox.Show("");
break;
case 1: MessageBox.Show("");
break;
case 2: MessageBox.Show(" ");
break;
case 3: MessageBox.Show(" ");
break;
case 4: MessageBox.Show(" ");
break;
case 5: MessageBox.Show("");
break;
public int value { get; set; }
//Json file reference code
string filepath = @"Assets\resources.json";
StorageFolder folder = Windows.ApplicationModel.Package.Current.InstalledLocation;
StorageFile file = await folder.GetFileAsync(filepath); // error here
var data = await Windows.Storage.FileIO.ReadTextAsync(file);
Thank you in advance and reply soon
Jayjay johnHi
I implemented a method in my app for json files in folder to read in a message box when i try to run in the emulator it throws the following exception "An exception of type 'System.NotImplementedException' occurred in DevotionJson.DLL but was not handled
in user code"
Kindly view my code below for necessary correction
CustomMessageBox cmb;
private void openMsgBox(object sender, RoutedEventArgs e)
// create new Stack panel
StackPanel sp = new StackPanel() { Orientation = System.Windows.Controls.Orientation.Vertical };
//get policy text from file
string policy = getPolicy();
//Create new label
TextBlock tb = new TextBlock()
Text =policy,
TextWrapping = TextWrapping.Wrap,
FontSize = 25,
//Create new Scroll viewer
ScrollViewer sv = new ScrollViewer()
VerticalScrollBarVisibility=ScrollBarVisibility.Auto,
Height=500,
// add texblock in scroll viewer
sv.Content = tb;
//Add the controls to stack panel
sp.Children.Add(sv);
// Create new Custom Message Box instance
cmb = new CustomMessageBox()
// Set its content to our Stack Panel
Content = sp,
Opacity = 0.98,
// Left button of message box Button
LeftButtonContent = "Accepts",
//Right button of message Box
RightButtonContent="Reject",
//Handle msg box click
cmb.Dismissing += cmb_Dismissing;
//Show the message box...
cmb.Show();
private string getPolicy()
throw new NotImplementedException();
void cmb_Dismissing(object sender, DismissingEventArgs e)
if (e.Result==CustomMessageBoxResult.LeftButton)
MessageBox.Show("Now you can use this app.");
else
//do what you want
MessageBox.Show("It's mandatory to accepts the T&C to use this app. Exiting from app.");
App.Current.Terminate();
public string getPolicy(string JsonfilePath)
string strText = "This";
using (StreamReader r = new StreamReader("BibleInYear/Bible1.json"))
string json = r.ReadToEnd();
dynamic array = JsonConvert.DeserializeObject(json);
//... read text from json file
return strText;
I await your response and thank you in advance
Jayjay john -
What should be stored in the DB when a special char is saved into the db?
Hello,
We have a 9.2.0.6 DB with charset as UTF8. We are putting the special character 'अ' into the database through a j2ee application. The application stores and displays the special character properly.
My question
1) When the special character is stored in the database, what should it be stored as? Should it store the HTML Entity (decimal) value - अ or should it store UT-8 (hex) value - e0a485?
2) When the data is viewed through a different application, it displays &32309; instead of 'अ'. Both the applications are almost similar. Any pointers on what need to be looked into would be appreciated
A few details on the special character 'अ'
This is a Hindi letter - Devanagari letter A
The URL below has all the unicode information on this special character
http://www-950.ibm.com/software/globalization/icu/demo/unicode?ch=0905
Thank youIf you are trying to view the character using Windows, the following metalink note may help
Note:179133.1 The correct NLS_LANG in a Windows Environment
iSQL is the only UTF-8 compliant client provided by ORacle, try it.
regards -
How to handle special character in SAP CRM
Hi all,
I am facing a problem on SAP CRM Web UI - Contact Creation - When a special character is inserted on address fields of Business
Partner (e.g. ` ~ ^ etc.), the interface does not understand this character and changes it to a TRIANGLE on pressing enter key.
Kindly guide as how to handle it or something is missing in terms of (note or patch).
I am running on SAP CRM 7.0
Thanks,
Pradeep Singh DhadwalHi Pradeep.
At the end of the day, a character is stored as a byte sequence on disk, and a code page defines the mapping between the byte sequence and any given character.The code page determines what character you can see and enter, therefore different code pages map different characters to the same byte sequence.
I suggest you to first check if your system is a Unicode system by checking the System menu->Status option->Unicode system field. I'll assume it is.
Then, please run report RSCP0018 (optionally also RSCPINST and then select Current NLS config pushbutton).
These reports will show you the actual configuration of languages and code pages of your Application Server. Please check that the correct languages and code pages are configured. If you need to know more about code pages configuration, please check Note 42305, which explains pretty well the whole process.
Kind regards, and good luck.
Federico
Maybe you are looking for
-
Training and Event Management: Relationships
Hi TEM Experts, What are the appropriate steps, or best practice, if the event we want to add is a one off, and wasn't really scheduled? Do we need to go through the entire PSV1, PV12, etc. process just to add a one off event so that it shows up on t
-
How to Clear Parameter IDs in ABAP?
Hi folks, How to clear SET parameter ID Field ccccc. Can anyone explain. Thanks, Matt
-
Netgear Genie not working in Safari
I have recently upgraded my router to a newer Netgear version. When I try to access the router control panel the window in Safari does not display the router control panel. I can logon but the nothing is generated in the window. It is viewable in Fir
-
What is F.13? When it is being used?
Hi All, What is Automatic Clearing using F.13? When is this being used? Can anybody give an example for the same? Thanks in advance. regards srikanth.
-
BBM6.2 on OS5 won't upgrade to BBM7
Strange this > I'm running BBM6.2 on OS5 (5.0.0.1106, bundle 1831) but App World won't upgrade to BBM7 > tried delete & reinstall > App World still forces a reinstall to 6.2 Download via Blackberry site gives 'server error' My dataplan provider is V