How to set CORS properties for BLOB Storage using node?
Hi - I just got started with Azure using a Node-based web site and mobile services.
I am following various documentation in order to provide an API for users to upload images via a time-restricted SAS for the BLOB Storage.
In order to upload my image, I need to set the CORS configuration for the BLOB Storage. Unfortunately this cannot be done via the management portal.
I'm unclear as to how to accomplish this. I'm considering using the startup.js file in my mobile service to make a post request to the BLOB Storage REST API:
http://msdn.microsoft.com/en-us/library/windowsazure/hh452235.aspx
Are there appropriate methods in the Node SDK to make this easier, especially the signing part?
What is the recommended way for setting CORS properties for the BLOB Storage via Node?
Thanks for your help
Stefan
Unfortunately Node SDK does not support CORS functionality yet. Your option would be to write code which consumes the REST API for setting CORS. Not sure if it helps but there's a free tool out there written by my company which you can use to set CORS
on your storage account. More information about this tool can be found here:
http://blog.cynapta.com/2013/12/cynapta-azure-cors-helper-free-tool-to-manage-cors-rules-for-windows-azure-blob-storage/
Hope this helps.
Similar Messages
-
Help Please: how to set JDBC properties for data encryption in BC4J
Hello,
I am trying to implement JDBC Thin Driver Support for Data Encryption and Integrity.
With java.sql.Connection and java.util.Properties, one would do something like the following code:
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Properties props = new Properties();
int level = AnoServices.REQUIRED;
props.put("oracle.net.encryption_client", Service.getLevelString(level));
props.put("oracle.net.encryption_types_client", "( RC4_40 )");
props.put("oracle.net.crypto_checksum_client",Service.getLevelString(level));
props.put("oracle.net.crypto_checksum_types_client", "( MD5 )");
Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@localhost:1521:main", props);
But, how can we do this with BC4J objects? Can we set this properties via EnvInfoProvider class? Please help. Thank you very much in advance.
ZhirongHi,
Try adding the code in the PBO part of your custom program used for the custom screen which you have created and added inside the BADI.
Regards,
Harish -
How to set up NAT for two servers using same port with ASDM ASA 5505
Hi there,
We have a new installation of a ASA 5505 and are trying to get some NAT issues straightened out. Here is the scenario: On our internal network, we have two servers running Filemaker Server, a relational database server that clients connect with using port 5003. Our goal is to be able to allow users from the outside to access either of these servers as needed. I know how to set up a simple static NAT rule and matching Access rule in ASDM which would be fine for a case in which only one server using a given port is running on a network, but for simple static rules I seem to be blocked from entering a different translated port number from the orginal port number, which becomes a problem when two servers we need to access from the outside are running software using the same port number.
What is the simplest way to address this need? I am guessing that I need to set up a scenario like this, where port 5004 (or any arbitrarily choosen unused port, can be used to access the second server:
Outside user enters FQDN:5004 and this translates to Database server # 1 as 192.168.1.40:5003
and
Outside user enters FQDN:5003 and this translates to Database server # 1 as 192.168.1.38:5003
If so, what is the easist way to get this done? Or is there a better what to handle this scenario?
Thanks in advance,
JamesI would create two objects and use object NAT
object network Obj_5004
host 192.168.1.40
object network Obj_5004
nat (inside,outside) static service tcp 5003 5004
object network Obj_5003
host 192.168.1.38
object network Obj_5003
nat (inside,outside) static service tcp 5003 5003
Of course you will need to open your outside interface for tcp ports 5003 and 5004 to make this happen -
How to set screen properties for Customer fields in PO(Enhanced using BADI)
Hi All,
I have added one custom tab with seven fields in the PO item level using the BADI 'ME_GUI_PO_CUST and ME_PROCESS_PO_CUST'.
Now i want to change the screen property dynamically. According to some calculation i need to change the customer fields in display mode and change mode. when ever it is in change mode i need to set the fields as mandatory.
How can i implement this logic using this BADI. Please help in solving this issue.
Best regards,
Kannan. BHi,
Try adding the code in the PBO part of your custom program used for the custom screen which you have created and added inside the BADI.
Regards,
Harish -
How to set resize effect for border container using flex 4 or 4.5
Hi friends,
resize effect works fine for one control (image). if want to same for custom comp, then is not working.
below is the code is in custom comp,
<?xml version="1.0" encoding="utf-8"?>
<s:VGroup xmlns:fx="http://ns.adobe.com/mxml/2009" width="200"
xmlns:s="library://ns.adobe.com/flex/spark" horizontalAlign="left" verticalAlign="bottom"
xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:parsley="http://www.spicefactory.org/parsley"
xmlns:general="com.presentation.components.general.*">
<fx:Declarations>
<parsley:Configure/>
</fx:Declarations>
<s:BorderContainer id="bcMain" backgroundColor="#f4f4f4" borderColor="#CDC7C7" borderStyle="solid" borderVisible="true" width="100%">
<s:layout>
<s:VerticalLayout horizontalAlign="left" verticalAlign="middle" paddingTop="5" paddingLeft="5" paddingRight="5" paddingBottom="5"/>
</s:layout>
<s:HGroup id="hg1" horizontalAlign="left" verticalAlign="middle" width="100%" gap="5"
buttonMode="true" useHandCursor="true" >
<s:Image id="img1" source="@Embed(source='assets/flex.png" width="15" height="17" cachePolicy="on" cacheAsBitmap="true"/>
<s:Label text="label 1" textAlign="center"/>
</s:HGroup>
<mx:HRule width="100%"/>
<s:HGroup horizontalAlign="left" verticalAlign="middle" width="100%" gap="10">
<s:BorderContainer id="bc1" width="35" useHandCursor="true" buttonMode="true"
backgroundColor="#f4f4f4" height="40">
<s:layout>
<s:VerticalLayout horizontalAlign="center" verticalAlign="middle"/>
</s:layout>
<s:Image id="img2" source="@Embed(source='assets/flex.png" cachePolicy="on" cacheAsBitmap="true"/>
<s:Label text="label 2" textAlign="center"/>
</s:BorderContainer>
<s:BorderContainer id="bc2" width="35" useHandCursor="true" buttonMode="true"
backgroundColor="#f4f4f4" height="40">
<s:layout>
<s:VerticalLayout horizontalAlign="center" verticalAlign="middle"/>
</s:layout>
<s:Image id="img3" source="@Embed(source='assets/flex.png" cachePolicy="on" cacheAsBitmap="true"/>
<s:Label text="label 3" textAlign="center"/>
</s:BorderContainer>
<s:BorderContainer id="bc3" width="35" useHandCursor="true" buttonMode="true"
backgroundColor="#f4f4f4" height="40">
<s:layout>
<s:VerticalLayout horizontalAlign="center" verticalAlign="middle"/>
</s:layout>
<s:Image id="img4" source="@Embed(source='assets/flex.png" cachePolicy="on" cacheAsBitmap="true"/>
<s:Label text="label 4" textAlign="center"/>
</s:BorderContainer>
</s:HGroup>
</s:BorderContainer>
</s:VGroup>
I followed how resize effects works for image control,
<mx:Resize id="expand" target="{img}" widthTo="100" heightTo="200" duration="2000"/>
<mx:Resize id="contract" target="{img}" widthTo="30" heightTo="60" duration="2000"/>
<s:Panel title="Resize Effect Example" width="100%" height="100%">
<s:VGroup width="100%" height="200" horizontalAlign="left" verticalAlign="bottom">
<mx:Image id="img" source="@Embed(source='assets/05_ipad.png')" width="10" height="10"/>
<mx:Button label="Expand" click="expand.end(); expand.play();"/>
<mx:Button label="Contract" click="contract.end(); contract.play();"/>
</s:VGroup>
</s:Panel>
Please help me.BorderContainer wont resize if the fixed width is specified, if u want to give some minimum width you can use minWidth . Give Width = "100%", now it will get Resizing capabilities
-
If I want to use java ORB to visit Visibroker ORB , how to set the Properties for init ?? can you help me ?
thanks !System.setProperty("org.omg.CORBA.ORBClass","com.inprise.vbroker.orb.ORB");
System.setProperty("org.omg.CORBA.ORBSingletonClass","com.inprise.vbroker.orb.ORB");You can get some examples here:
http://maris.site.lv/ejb.html
best regards,
Maris Orbidans -
How do I set individual properties for a column in report layout at runtime
How do I set individual properties for a column in report layout at runtime? I need to change this based on a user's input. This is for v10g.
I need to change either the "Read from File" attribute or the "File Format" attribute for one column based on the user's input. IS this possible?
Thanks in advance!Hi,
define 2 columns and use format triggers to show the one or the other column.
Regards
Rainer -
Labels pointing to pie slices with lines (or how 2 set chart properties in code behind)
I want to be able to create lines outside of my pie chart with labels and have those lines drawn to connect to the pie chart. I saw that this can be done in code behind in the following thread:
MSDN thread on lines to pie slices
But my problem is I never declared an instance of my chart when I am using my code behind. My code that makes the reports visible is basically (but not completely) the following:
ReportDataSet.Tables.Add(ReportDataTable)
ReportViewer.Visible = True
Dim ReportDataSource As ReportDataSource = New ReportDataSource("ReportDataSource", ReportDataSet.Tables(0))
ReportViewer.LocalReport.ReportPath = ReportToDisplay.RDLCFileName
ReportViewer.LocalReport.DataSources.Clear()
ReportViewer.LocalReport.DataSources.Add(ReportDataSource)
ReportDataSource.Name = ReportToDisplay.DataSetName
ReportViewer.DataBind()
ReportViewer.LocalReport.Refresh()
ReportViewer.ShowReportBody = True
ReportViewer.Width = RVWidth
ReportViewer.Height = RVHeight
So how do I set chart properties for my report given the above code? As long as I can set my chart properties with the above code, I should be able to get this to work given the above thread and the link to the Label-Outside-of-Pie and Line-Color properties
(or whatever) info on Microsoft's info pageHello,
Based on your description, you want to design a
pie chart with outside lables and pie line inside a .rdlc report. If so, you can add the Chart report item into the report after open a client report definition (.rdlc) file in graphical design mode. And then Set the
PieLabelStyle property and PieLineColor property. Please refer to the following screen shot:
The link your post above it about the
Chart Web server control. As pre my undersntand, you cannot reference a Web server control inside .rdlc file.
If you have any question about using Chart Web server control, you can post a question on
Chart Controls for .NET Framework forum.
Regards,
Fanny Liu
If you have any feedback on our support, please click here.
Fanny Liu
TechNet Community Support -
Set Global Properties for ADF components
Hi everyOne....
My question is the following .... let me know how I can set global properties for a component and not have to set the same property in each of them.
Thanks
EdmarLet me know if this answers your question:
For Attributes : set the properties in EO or VO. [You can set all UI properties too]
For labels: use Resource bundle
For Layout Components to set the look and feel. CSS/Skinning would be the best.
I guess this should cover most part of application.
Amit -
How to set Compatibility Mode for a single site in ie10
This question was originally posted on the Answers forum -
http://answers.microsoft.com/en-us/ie/forum/ie10-windows_7/how-to-set-compatibility-mode-for-a-single-site-in/187152e3-142a-4d96-8d1b-af82ef571eec
I am having problem with getting ie10 to set ie9 compatibility for a single site (sharepoint.contoso.com).
When I add this website in Compatibility View Settings (Alt > Tools > Compatibility View Settings > 'Add this Website') it adds the domain 'contoso.com' and not the individual website (sharepoint.contoso.com).
This cause other sites (www.contoso.com) to be configured to use compatibility mode. Because this is a separate site (different web server) to the site sharepoint.contoso.com (sharepoint 2010 server) we need different compatibility settings.
Using a different example to explain the issue -
Microsoft has three websites that are different websites created by different developers written in different programming languages and they only work with certain browsers.
microsoft.com (Website1 created by Developer1) - compatible with ie8/ie9/ie10
msdn.microsoft.com (Website2 created by Developer2) - compatible with ie8/ie9
technet.microsoft.com (Website3 website created by Developer3) - compatible only with ie10
The only thing the three website share is the URL contains 'microsoft.com'.
Marking 'msdn.microsoft.com' to run in compatibility mode affects the other 2 websites - mainly technet.microsoft.com which will not work now since it only runs in pure ie10 mode.
Should you be able to add an individual site to the compatibility list instead of all sites that have .microsoft.com in the URL? Am I missing a simple setting in the ie10?
As a workaround I am using the F12 Developer Tools to set the Browser Mode which temporary sets the compatibility mode. However this is not a nice solution to the end users at our organisation.problem is not solved for non corporate environments...
You could start your own thread. Then if you got that answer and it was marked Answered you would have the ability to unmark it. The OP of this one seems satisfied. Also note that this is TechNet. Consumers can get help on Answers
forums.
Robert Aldwinckle
Oh! I wrote it wrong: I should have said: This is not solved for NON-AD environments. No demands what so ever to use Window 7/8 professional in a small corporation or on a big corporation with Island of smaller departments for example offshore.
The problem is that the thread is not "Answered" by the OP, its is marked answered by a moderator (and same moderator that did the answer) so no way of telling if the OP is satisfied.
But you are right in the fact that I am almost kidnapping the thread. But a complete answer would benefit all in this case I would presume.
Regards
/Aldus -
How to set a background for jFrame?
Hai.i have a code for background image.i.e
* TextOver.java
* Created on June 23, 2008, 1:53 PM
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import javax.imageio.ImageIO;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
public class TextOver
private static final String IMAGE_PATH =
"http://upload.wikimedia.org/wikipedia/commons/b/b5/HMS_Cardiff_%28D108%29_1.jpg";
private BufferedImage image;
private JTextArea textarea = new JTextArea(20, 40);
private JPanel mainPanel = new JPanel()
@Override
protected void paintComponent(Graphics g)
super.paintComponent(g);
if (image != null)
g.drawImage(image, 0, 0, this);
public TextOver()
URL imageUrl;
try
imageUrl = new URL(IMAGE_PATH);
image = ImageIO.read(imageUrl);
Dimension imageSize = new Dimension(image.getWidth(), image.getHeight());
mainPanel.setPreferredSize(imageSize);
JScrollPane scrollpane = new JScrollPane(textarea);
textarea.setOpaque(false);
scrollpane.setOpaque(false);
scrollpane.getViewport().setOpaque(false);
mainPanel.add(scrollpane);
catch (MalformedURLException e)
e.printStackTrace();
catch (IOException e)
e.printStackTrace();
public JPanel getPanel()
return mainPanel;
private static void createAndShowGUI()
admin_login_code a=new admin_login_code();
a.setVisible(false);
JFrame frame = new JFrame("TextAreaOverImage Application");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(new TextOver().getPanel());
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(false);
public static void main(String[] args)
javax.swing.SwingUtilities.invokeLater(new Runnable()
public void run()
createAndShowGUI();
i want to give this backgground to my existing jFrame something like
import java.sql.*;
import java.io.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class admin_login_code extends javax.swing.JFrame {
String admin_name;
String password;
Connection con;
Statement stmt;
ResultSet rs;
public admin_login_code() {
initComponents();
jPasswordField1.addKeyListener(new KeyAdapter() {
public void keyTyped(KeyEvent e) {
char c = e.getKeyChar();
if (!(Character.isDigit(c) ||
(c == KeyEvent.VK_BACK_SPACE) ||
(c == KeyEvent.VK_DELETE))) {
getToolkit().beep();
e.consume();
jFormattedTextField1.addKeyListener(new KeyAdapter() {
public void keyTyped(KeyEvent e) {
char c = e.getKeyChar();
if (!(Character.isLetter(c) ||
(c == KeyEvent.VK_BACK_SPACE) ||
(c == KeyEvent.VK_DELETE))) {
getToolkit().beep();
e.consume();
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jPanel1 = new javax.swing.JPanel();
jLabel2 = new javax.swing.JLabel();
jFormattedTextField1 = new javax.swing.JFormattedTextField();
jLabel4 = new javax.swing.JLabel();
jPasswordField1 = new javax.swing.JPasswordField();
jPanel2 = new javax.swing.JPanel();
jButton1 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 36));
jLabel1.setForeground(new java.awt.Color(255, 0, 0));
jLabel1.setText("ADMIN LOGIN");
jLabel2.setFont(new java.awt.Font("Tahoma", 1, 24));
jLabel2.setText("Admin Name");
jFormattedTextField1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jFormattedTextField1ActionPerformed(evt);
jLabel4.setFont(new java.awt.Font("Tahoma", 1, 24));
jLabel4.setText("Password");
jPasswordField1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jPasswordField1ActionPerformed(evt);
org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.add(39, 39, 39)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jLabel4)
.add(jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 161, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(43, 43, 43)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPasswordField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE)
.add(jFormattedTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE))
.addContainerGap())
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.add(47, 47, 47)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 34, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jFormattedTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(60, 60, 60)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jLabel4)
.add(jPasswordField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
jButton1.setText("Login");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
jButton3.setText("Exit");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup()
.add(38, 38, 38)
.add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 93, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 110, Short.MAX_VALUE)
.add(jButton3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 93, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(55, 55, 55))
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel2Layout.createSequentialGroup()
.add(38, 38, 38)
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jButton3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 32, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 32, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addContainerGap(30, Short.MAX_VALUE))
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(574, 574, 574)
.add(jLabel1))
.add(layout.createSequentialGroup()
.add(459, 459, 459)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
.addContainerGap(521, Short.MAX_VALUE))
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(149, 149, 149)
.add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(43, 43, 43)
.add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(42, 42, 42)
.add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(250, Short.MAX_VALUE))
pack();
}// </editor-fold>
private void jPasswordField1ActionPerformed(java.awt.event.ActionEvent evt) {
private void jFormattedTextField1ActionPerformed(java.awt.event.ActionEvent evt) {
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
Object src=evt.getSource();
if(src==jButton3)
dispose();
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
Object src=evt.getSource();
if(src==jButton1)
admin_name=jFormattedTextField1.getText();
password=jPasswordField1.getText();
try
Class.forName("oracle.jdbc.driver.OracleDriver");
con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcle","scott","root");
stmt=con.createStatement();
rs=stmt.executeQuery("select admin_name,password from admin_registration where admin_name='chandana' and password='8989' ");
while(rs.next())
if(admin_name.equals(rs.getString(1))&&password.equals(rs.getString(2)))
admin_registration a=new admin_registration();
a.setVisible(true);
dispose();
else
JOptionPane.showMessageDialog(null,"Please enter admin name & password ");
catch(ClassNotFoundException e)
e.printStackTrace();
catch(SQLException e)
e.printStackTrace();
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
admin_login_code a=new admin_login_code();
a.setVisible(true);
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton3;
private javax.swing.JFormattedTextField jFormattedTextField1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel4;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPasswordField jPasswordField1;
// End of variables declaration
Can any one can help me how to set a background for jFrame?
Thank you in advance.
Edited by: forums.com on Jul 14, 2008 1:40 AM90% of the code you posted is not relevant to your question.
If you want further help post a Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the problem.
And don't forget to use code tags when posting code. -
How to set default values for boolean columns
I'm trying to deploy some content types and columns into a site with a feature. All it's ok, except that I'm trying to set a default value for boolean columns with no success.
I've tried to set default value at column level:
<Field ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DisplayName="Se publican noticias en español"
Type="Boolean" Hidden="FALSE" Group="Columnas ShaCon" >
<Default>TRUE</Default>
</Field>
and at content type level:
<FieldRef ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DefaultValue="TRUE" Required="TRUE" />
But in any case, when i create a new item with this content type, default value is applied.
Can anyone tell how to set default values for boolean columns?
Thanks in advance,
Regards,
SergioIn the field definition you can set
<Default>1</Default>
or
<Default>0</Default>
How to set the default value Null? -
Hi All,
How to create a Platinum,Gold and Silver Customer and how to set different price for a single material based on customer?
Assume Material is Pen.
While creating Sales Order in VA01 how to bring different price for the same material for Platinum,Gold and Silver Customers.
Kindly help me out.
Thanks,
Renjith JoseA good place to start is http://www.javaworld.com/javaworld/javatips/jw-javatip34.html
Also, do a search in this forum on HttpURLConnection. That class allows you to use POST method to send form data to a web server.
"Hidden" variables are only hidden in HTML. The HTTP that gets POSTed to the web server doesn't distinguish between hidden and not hidden. That is, the content you would write to the HttpURLConnection.getOutputStream() would be something like:
hidden=1&submit=ok(Of course, the variable names would depend on what the web server was expecting from the form.)
Also, be sure to set the Content-Type request parameter to "application/x-www-form-urlencoded" -
How to set background color for selected days in DateChooser
How to set background color for selected days. I created
checkbox for each day [Son,Mon,Tue,Wed,Thu,Fri,Sat] and a
DateChooser, I want to change the background color for the selected
day when i click on a button after selecting the desired checkboxs
[ monthly wise/yearly wise]
Thanks in advanceThere is no button involved in the following code, but it may
be of use to you:
<?xml version="1.0"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
creationComplete="init()">
<mx:Script>
<![CDATA[
private var origColor:uint;
private function init():void {
origColor = dc.getStyle("selectionColor");
public function setBackGrdColors(newColor:uint):void {
dc.setStyle("selectionColor", origColor);
if(dc.selectedDate){
var dayOfWeek:Number = dc.selectedDate.day;
else{
return;
switch(dayOfWeek) {
case 0:
if(sun.selected)
dc.setStyle("selectionColor", newColor);
break;
case 1:
if(mon.selected)
dc.setStyle("selectionColor", newColor);
break;
case 2:
if(tue.selected)
dc.setStyle("selectionColor", newColor);
break;
case 3:
if(wed.selected)
dc.setStyle("selectionColor", newColor);
break;
case 4:
if(thu.selected)
dc.setStyle("selectionColor", newColor);
break;
case 5:
if(fri.selected)
dc.setStyle("selectionColor", newColor);
break;
case 6:
if(sat.selected)
dc.setStyle("selectionColor", newColor);
break;
default:
break;
]]>
</mx:Script>
<mx:VBox horizontalAlign="center" verticalGap="20">
<mx:DateChooser id="dc" textAlign="left"
change="setBackGrdColors(cellColor.selectedColor)"/>
<mx:HBox width="100%" horizontalAlign="center">
<mx:CheckBox id="sun" label="Sun"/>
<mx:CheckBox id="mon" label="Mon"/>
<mx:CheckBox id="tue" label="Tue"/>
<mx:CheckBox id="wed" label="Wed"/>
</mx:HBox>
<mx:HBox width="100%" horizontalAlign="center">
<mx:CheckBox id="thu" label="Thu"/>
<mx:CheckBox id="fri" label="Fri"/>
<mx:CheckBox id="sat" label="Sat"/>
</mx:HBox>
<mx:HBox width="300" horizontalAlign="center">
<mx:Label text="Background Color" />
<mx:ColorPicker id="cellColor"
selectedColor="#FF00FF"/>
</mx:HBox>
</mx:VBox>
</mx:Application> -
hi. i bought iphone 5 witch was locked, i made factory reset and now phone asking apple ID and pasword witch i dont know. i was writing to seller but he is not answering me. how to set new account for my iphone 5 what i could use it?
The iPhone has a feature called "Activation Lock" described here:
http://support.apple.com/kb/PH13695
Without that Apple ID, you will not be able to use that iPhone.
Maybe you are looking for
-
Skype not working after upgrading to 10.6.8
My skype stopped after I upgraded my computers to 10.6.8. I did reinstall the programme, but I am still getting a a dead white screen where skype is supposed to be. Anybody has any ideas on how to address this? Thanks
-
Elements 8 Organiser will not load Photoshop as External Editor
For some years I've succesfully used Photoshop CS2 with Elements (various versions) Organiser as my photo file manager. The Organiser allowed me to select Photoshop as the external editor and subsequently accepted/managed the edited photos from Phot
-
Program and Source Monitor buttons not working?
I need to take a screen capture of my project, but NONE of the Program monitor buttons are working. I click them and it doesn't do anything. I'm posting this because none of the suggestions in the other discussions helped me at all. Screen Capture wo
-
Get-adgroupmember says it completed successfully but displays nothing in Powershell
I am trying to display all the members of administrators so I try Get-ADgroupmember -identity administrators and it returns Get-ADGroupmember : The operation completed successfully At line:1 Char:18 + Get-ADgroupmember <<<< +CategoryInfo "Not
-
ProcessBuilder issue...
Hi at all... I have some problem with this class that I made: import java.io.*; public class ProcessComunicator implements Runnable{ final private char endl = '\n'; private ProcessBuilder pb = null; private Process proc = null; pr