Daily Archives

Articles indexed Thursday January 13 2011

Page 17/37 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • jQuery: appendTo parent

    - by Kenneth B
    Hi guys I can't seem to get the appendTo to work. What do I do wrong? $('div:nth-child(2n) img').appendTo(parent); Current markup: <div class="container"> <img src="123.jpg" /> <p>Hey</p> </div> <div class="container"> <img src="123.jpg" /> <p>Hey</p> </div> I want this output: <div class="container"> <p>Hey</p> <img src="123.jpg" /> </div> <div class="container"> <p>Hey</p> <img src="123.jpg" /> </div> Please help me guys... I'm tearing my hair of every minute.. :-S

    Read the article

  • Host WCF in MVC2 Site

    - by Basiclife
    Hi, We've got a very large, complex MVC2 website. We want to add an API for some internal tools and decided to use WCF. Ideally, we want MVC itself to host the WCF service. Reasons include: Although there's multiple tiers to the application, some functionality we'd like in the API requires the website itself (e.g. formatting emails). We use TFS to auto-build (continuous integration) and deploy - The less we need to modify the build and release mechanism the better We use the Unity container and Inversion of Control throughout the application. Being part of the Website would allow us to re-use configuration classes and other helper methods. I've written a custom ServiceBehavior which in turn has a custom InstanceProvider - This allows me to instantiate and configure a container which is then used to service all requests for class instances from WCF. So my question is; Is it possible to host a WCF service from within MVC itself? I've only had experience in Services / Standard Asp.Net websites before and didn't realise MVC2 might be different until I actually tried to wire it into the config and nothing happened. After some googling, there don't seem to be many references to doing this - so thought I'd ask here.

    Read the article

  • IE7 & 8 not fireing jQuery click events for elements appended inside a table

    - by Keith
    I have an IE bug that I'm not sure how to fix. Using jQuery I'm dynamically moving a menu to appear on an element on mouseover. My code (simplified) looks something like this: $j = jQuery.noConflict(); $j(document).ready(function() { //do something on the menu clicks $j('div.ico').click(function() { alert($j(this).parent().html()); }); setUpActions('#tableId', '#menuId'); }); //on mouseover set up the actions menu to appear on mouseover function setUpActions(tableSelector, menuSelector) { $j(tableSelector + ' div.test').mouseover(function() { //note that append will move the underlying //DOM element with all events from it's old //parent to the end of this one. $j(this).append($j(menuSelector).show()); }); } This menu doesn't seem to register events correctly for the menu after it's been moved in IE7, IE8 and IE8-as-IE7 (yeah MS, that's really a 'new rendering engine' in IE8, we all believe you). It works as expected in everything else. You can see the behaviour in a basic demo here. In the demo you can see two examples of the issue: The image behind the buttons should change on hover (done with a CSS :hover selector). It works on the first mouseover but then persists. The click event doesn’t fire – however with the dev tools you can manually call it and it is still subscribed. You can see (2) in IE8's dev tools: Open page in IE8 Open dev tools Select "Script" tab and "Console" sub-tab Type: $j('#testFloat div.ico:first').click() to manually call any subscribed events There will be an alert on the page This means that I'm not losing the event subscriptions, they're still there, IE's just not calling them when I click. Does anyone know why this bug occurs (other than just because of IE's venerable engine)? Is there a workaround? Could it be something that I'm doing wrong that just happens to work as expected in everything else?

    Read the article

  • Resizing page format on iReport

    - by pringlesinn
    I've been trying to print a pdf made from iReport in less than a page A4. it's like half A4 page height. I'm using a Line Matrix printer, doesn't matter which one. So, when I try to print 2 files at same file, it should print everything on the right place, but just first file is printed correctly. The second one is based on a A4 page format, and just starts printing after A4 page height is over, skipping a big blank. Where can I set the size of page in iReport? The only thing I could do was setting size of what is shown on screen while I edit the file. I tried my best to explain the situation, any doubts, ask me and I'll try even harder.

    Read the article

  • Bytes by MSDN - Let's talk Cloud

    - by Wallym
    While I was at DevConnections in Las Vegas, I was honored to be interviewed by Tim Huckaby for "Bytes by MSDN" on Cloud Computing. Here's a short intro from the talk:Do you believe in the Cloud? Wallace McClure, Founder and Architect of Scalable Development, Inc., does. His customers are extremely interested in the value and economies of scale that Cloud Computing, and more specifically, Windows Azure can bring. Building out an infrastructure that supports your web service or application can be expensive, complicated and time consuming. Or you could look to the Microsoft cloud. The Windows Azure platform is a flexible cloud–computing platform that lets you focus on solving business problems and addressing customer needs. Wally talks about all this, and more, in this interview with Tim Huckaby, and in his Windows Azure podcasts.

    Read the article

  • Git Repo to mantain the app configurations in several servers

    - by user62904
    Hi! I need to versioning in a GIT repository, configurations of a particular platform, spread across multiple servers. Take into account that in each of these servers there are completely different configurations, while the application is the same. What is the best way to do this? Create a branch for each server repository.git:conf -- [branch Server 1] repository.git:conf -- [branch Server 2] repository.git:conf -- [branch Server N] Note: This method seems to me, that is difficult to maintain because each change in the server configurations, I need to create subbranches which becomes confusing. Create a single repo with a different directory for each server repository.git:conf/Server 1 repository.git:conf/Server 2 repository.git:conf/Server N Note: This is easy to mantain Create a repo for each server repository_1.git:conf repository_2.git:conf repository_N.git:conf Note: This method requires me to create a branch for each new server. There are other methods, what are the best practices in this case? Should I use the one that I feel most comfortable? Tks, Gulden PT

    Read the article

  • minimum required bandwidth for remote database server

    - by user66734
    I want to build a small warehousing application for my company. We have a central warehouse which distributes to 8 sales points across the country. They insist on an in-house solution. I am thinking to setup a central mySQL db Linux server and have the branches connect to it to store sales. Queries to the db from the branches will be minimum, maybe 10 per hour. However I need all the branches to be able to store each sale data ( product ID, customer ID ) in the central db at peak time at most once every five minutes. My question is can I get away with simple 24mbps/768kbps DSL lines? If not what is the bandwith requirement? Can I rely on a load balancing router to combine additional lines if needed? Can you propose some server hardware specs?

    Read the article

  • How to Run vnc4server on Ubuntu in Certain Resolution?

    - by Boris Pavlovic
    There's a headless Ubuntu instance used as a host for our build server. I have some UI code that requires some graphical output. Installing a vnc4server and redirecting a DISPLAY to it worked like a charm. Not that my UI tests are running but test scripts can take screen shots. Problem is that I need to set the resolution that vnc4server uses to serve the graphical content. Does anybody know how to configure it on Ubuntu server?

    Read the article

  • What is the best way to auto failover to backup WAN link for web server

    - by user66735
    Hi Iam looking for the best way to ensure my server ( application ) remains available for all my users (on web/LAN/WAN ), when my primary ISP link fails. My server is behind a firewall on which both my primary & secondary links land. I have already assigned multiple IPs (both ISP's static IP) to the 'A' record ( host.example.com ) in the DNS. However in a round robin scenario is there a way I can ensure that my web user will not see a "cannot dislay web page" error ever ?? What are the better methods to achieve this??

    Read the article

  • Problem deploying GWT application on apache and tomcat using mod_jk

    - by Colin
    I'm trying to deploy a GWT app on Apache using mod_jk connector. I have compiled the application and tested it on tomcat on the address localhost:8080/loginapp and it works ok. However when I deploy it to apache using mod_jk I get the starter page which gives me a login form but trying to login I get this error 404 Not Found Not Found The requested URL /loginapp/loginapp/login was not found on this server Looking at the apache log files i see this [Thu Jan 13 13:43:17 2011] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/tomcat/webapps/loginapp/WEB-INF/ [Thu Jan 13 13:43:26 2011] [error] [client 127.0.0.1] File does not exist: /usr/local/tomcat/webapps/loginapp/loginapp/login, referer: http://localhost/loginapp/LoginApp.html The mod_jk configurations on my apache2.conf file are as follows LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so JkWorkersFile /etc/apache2/workers.properties JkLogFile /var/log/apache2/mod_jk.log JkLogLevel info JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkRequestLogFormat "%w %V %T" <IfModule mod_jk.c> Alias /loginapp "/usr/local/tomcat/webapps/loginapp/" <Directory "/usr/local/tomcat/webapps/loginapp/"> Options Indexes +FollowSymLinks AllowOverride None Allow from all </Directory> <Location /*/WEB-INF/*> AllowOverride None deny from all </Location> JkMount /loginapp/*.html loginapp My workers.properties file is as follows workers.tomcat_home=/usr/local/tomcat workers.java_home=/usr/lib/jvm/java-6-sun ps=/ worker.list=loginapp worker.loginapp.type=ajp13 worker.loginapp.host=localhost worker.loginapp.port=8009 worker.loginapp.cachesize=10 worker.loginapp.cache_timeout=600 worker.loginapp.socket_keepalive=1 worker.loginapp.recycle_timeout=300 worker.loginapp.lbfactor=1 And this is my servlet mappings for my app on the application's web.xml <servlet> <servlet-name>loginServlet</servlet-name> <servlet-class>com.example.loginapp.server.LoginServiceImpl</servlet-class> </servlet> <servlet-mapping> <servlet-name>loginServlet</servlet-name> <url-pattern>/loginapp/login</url-pattern> </servlet-mapping> <servlet> <servlet-name>myAppServlet</servlet-name> <servlet-class>com.example.loginapp.server.MyAppServiceImpl</servlet-class> </servlet> <servlet-mapping> <servlet-name>myAppServlet</servlet-name> <url-pattern>/loginapp/mapdata</url-pattern> </servlet-mapping> Ive tried everything and it seems to still elude me. Even tried changing the deny from all directive on the WEBINF folder to allow from all and still it doesnt work. Maybe im missing something. Any help will be highly appreciated.

    Read the article

  • starting oracle database automatically.

    - by Searock
    I am using Fedora 8 and Oracle 10g Express Edition. Every time I start my fedora I have to click on start database. How can I add startdb.sh to startup so that it automatically executes when Fedora starts? I have tried adding the path to /etc/rc.d/rc.local but it still doesn't work. ./usr/lib/oracle/xe/app/oracle/product/10.2.0/server/config/scripts/startdb.sh I have even tried to add this script in /etc/init.d/oracle #!/bin/bash # # Run-level Startup script for the Oracle Instance and Listener # # chkconfig: 345 91 19 # description: Startup/Shutdown Oracle listener and instance ORA_HOME="/u01/app/oracle/product/9.2.0.1.0" ORA_OWNR="oracle" # if the executables do not exist -- display error if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ] then echo "Oracle startup: cannot start" exit 1 fi # depending on parameter -- startup, shutdown, restart # of the instance and listener or usage display case "$1" in start) # Oracle listener and instance startup echo -n "Starting Oracle: " su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl start" su - $ORA_OWNR -c $ORA_HOME/bin/dbstart touch /var/lock/subsys/oracle echo "OK" ;; stop) # Oracle listener and instance shutdown echo -n "Shutdown Oracle: " su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl stop" su - $ORA_OWNR -c $ORA_HOME/bin/dbshut rm -f /var/lock/subsys/oracle echo "OK" ;; reload|restart) $0 stop $0 start ;; *) echo "Usage: $0 start|stop|restart|reload" exit 1 esac exit 0 and even this doesn't work. startdb.sh is located at /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/config/scripts/startdb.sh Thanks.

    Read the article

  • Serial port access errors in WINE

    - by goldenmean
    Hello, I have a setup in which I use a USB serial adapter + some application which sends and receives data using that serial usb. But this setup which works on a Windows, or even in a VMWare Virtual windows, does not work under WINE. IT transmits data but i cannot receive data. The cable and the applications are same as in the working and non-working scenarios. I guess The fact that the application works over the USB serial cable just as fine under Virtual Windows(VMware running on linux) by mapping /dev/ttyUSB to the com port, no external software/DLL needed, means it does not need any specific driver. (Am I correct in this assumption that application doesnt need any driver?) (I also tried with a different setup(different USB serial adapter + different application under WINE, but even that does not work under WINE, but it works fine under WIndows/Virtual Windows) How can I get it working under WINE? Any pointers appreciated.

    Read the article

  • Displaying Unicode on Chrome vs Firefox

    - by abel
    Unicode Rendering: Firefox vs Chrome OS: Windows XP SP3 My question is about the rendering of this post on Firefox vs Chrome. I can see a lot of boxes on Chrome, not so much on Firefox. Firefox: Chrome: What do I do? Update: Update 2 Changed Sans Serif fonts on Chrome to Arial Unicode and restarted Update 3 This is inspired by @Arjan's references The smilies on Firefox(The reference smilies are the ones below) The smilies on Chrome(The reference smilies are the ones below) Update: The source of the above post is displayed as below Firefox Chrome

    Read the article

  • Missing MB on a GPT partioned SSD

    - by pisswillis
    I recently installed Arch Linux on an Intel 40GB SSD. I used GPT for partioning (via GNU parted) and created the following partions: /dev/sda1 : 1 MB, no FS, flag=bios_grub /dev/sda2 : 30MB, /boot, ext2, flag=boot /dev/sda3 : 20GB, /home, ext4 /dev/sda4 : ~20GB, /, ext4 After struggling to install grub2 from the livecd environment (which I finally did via grub-install /dev/sda --root-directory=/mnt/ --no-floppy --force) I got a working system. However, when I was inspecting disk usage with df I noticed that my home partition had around 170MB of used space on it. This surprised me because the only things on /home were one users .bashrc, .bash_history, and .lesshst. du confirmed that there was only a few KB of space being used on /home. Why does df report approximately 170MB being used when du does not? Is this space "gone forever", or can I regain it by repartioning and/or reinstalling? When I installed grub2 it said something along the lines of "your embed area is too small", and that I could "use BLOCKLISTS, but BLOCKLISTS are UNRELIABLE". In the end the only way I could get a system booting from the SSD was to use blocklists via the grub-install --force flag. Is this related to the mysterious missing 170MB? Thanks

    Read the article

  • The final set of SQLBits videos has been uploaded

    - by simonsabin
    The final set of SQLbits videos has been uploaded to the site. You can either watch online or download them. Some highlights of sessions that have been uploaded are Lies, Damned Lies And Statistics. Making The Most Out of SQL Server Statistics attend this session to understand exactly how the optimiser decides on its plans SSIS Dataflow Performance tuning Need to eek out a bit more oomph from your dataflows. This session might be of some use. TSQL Techniques – Why and how to tune a routine an overview...(read more)

    Read the article

  • Letöltheto az Oracle Database Firewall 5.0

    - by Lajos Sárecz
    2010 május 20-án jelentettük be, hogy megvettük az adatbázis tuzfal megoldást fejleszto Secerno céget. Azóta viszonylag keveset lehetett hallani errol a termékrol, idehaza egyedül az oszi ITBN konferencián tartott róla eloadást Stuart Sharp szuk fél órában. Ráadásul a felvásárlás óta a terméket sem lehetett megvásárolni, hiszen a merge után folyó fejlesztések még nem voltak készen. Január 11. óta azonban letötlheto az Oracle Database Firewall 5.0 telepítoje az Oracle edelivery oldaláról az Oracle Database Product Pack-en belül Linux x86 platformra. A Database Firewall az adatbázis védelem elso vonalának tekintheto. Valós idoben monitorozza az adatbázis aktivitását a hálózaton. SQL nyelvi elemzojével rendkívül pontosan képes detektálni a külso és belso támadásokat, a jogosultatlanul, támadó szándékkal végrehajtott tranzakciókat. Az SQL nyelvi elemzojének kifinomultsága lehetové teszi a szurés közel 100%-os pontosságát és megbízhatóságát, ami azért rendkívül fontos, mert nem elég minden támadó tranzakciót kiszurni, de fontos hogy a normál üzletmenetnek megfelelo tranzakciók közül egyet se szurjön, hiszen az is komoly üzleti károkat okozhat. Az adatbázis tuzfalról több részletet tudhat meg mindenki, aki regisztrál és ellátogat a január 27-i Oracle Security Summit rendezvényünkre, ahol a tervek szerint ismét Stuart Sharp tart majd eloadást, viszont ezúttal 1 órában sokkal több részletet tud megosztani a magyar ügyfelekkel és partnerekkel. A Database Firewall eloadást megelozoen egyébként én tartok egy kb. félórás áttekintést az Oracle Database biztonsági megoldásairól.

    Read the article

  • How do you KISS ?

    - by Conor
    The KISS principal is a highly quoted design mantra. The aim of this principle is to stamp out unnecessary complexity on a project. This is a good thing, saving time, energy and money. It can lead to a relatively stress free implementation and a simple, elegant, maintainable end product. A lot of discussion on KISS provides mechanisms to simplify requirements, design and implementation. Things that spring to mind include: avoid scope creep; simple obvious design and code; minimal run-time dependencies; refactoring to maintain simplicity; etc. However there are a lot of implicit things that we do to KISS. Examples: small team sizes; minimal management layers; tidy desk; mastery of a single IDE; clear concise error messages; scripts to automate/encapsulate tasks; etc The purpose of this question is to derive a checklist of KISS items. I'm especially interested in non-obvious items.

    Read the article

  • Can desktop applications be written using javascript?

    - by jase21
    Is it currently possible to write desktop applications using javascript, html, css? Possible solutions: Use Adobe AIR runtime and program in js. But no, if I'm using AIR, the AS3 suites it the most. So not a good option. GWT: No because it uses Java and then convert it to js or what ever. Pyjamas: Interesting. But I'm currently focusing on JavaScript. So I don't want to use python and cross-compile to js. Run a local server and use the browser in full screen mode. Sort of okay, but still its the same browser thing. And difficult to distribute. So what is the best option? I'm excited about node.js which is the main reason for looking into JavaScript. Otherwise I would have choose python.

    Read the article

  • What is your definition of a programmer?

    - by Amir Rezaei
    The definition of a programmer is not obvious. It has happened that I have asked questions in this forum where people believe it don’t belong here because it’s not programmer related. I thought this question may clarify the definition. What characteristics, roles and activities do you think defines a programmer? Is there a typical programmer? The technology changes so fast that it may be hard to be typical programmer. From wikipedia: A programmer, computer programmer or coder is someone who writes computer software. The term computer programmer can refer to a specialist in one area of computer programming or to a generalist who writes code for many kinds of software. One who practices or professes a formal approach to programming may also be known as a programmer analyst. A programmer's primary computer language (C, C++, Java, Lisp, Delphi etc.) is often prefixed to the above titles, and those who work in a web environment often prefix their titles with web. The term programmer can be used to refer to a software developer, software engineer, computer scientist, or software analyst. However, members of these professions typically possess other software engineering skills, beyond programming; for this reason, the term programmer is sometimes considered an insulting or derogatory oversimplification of these other professions. This has sparked much debate amongst developers, analysts, computer scientists, programmers, and outsiders who continue to be puzzled at the subtle differences in these occupations

    Read the article

  • Weather Indicator

    - by Nik
    I recently replaced the indicators in the gnome panel with the Indicator Applet Complete, as can be seen in the screenshot below. However I really miss the weather which used to be displayed with the date gnome applet. I tried searching for an alternative weather indicator and found one here. However its ppa is empty and no longer works. Is there any other alternative? I prefer it being an indicator rather than a ordinary gnome applet as I already know that there is one that can be added to the gnome panel (screenshot below for more info)

    Read the article

  • Is it safe to configure "Shutdown" on "When laptop lid is closed" ?

    - by Takkat
    To setup a laptop owned by a complete PC novice any settings that may become hard to tackle remotely need to be avoided. The laptop will be administrated via SSH. One thing in my list are problems arising from improper wake-ups from suspend or hibernate as they may also affect network accessibility. This is why I thought setting up power management to "shutdown" on closing the laptop lid could be a good idea. However I am not sure if this is a safe way to do. What problems in addition to software not closing properly (and thus not saving their data) could I be faced if I proceeded as planned?

    Read the article

  • GridBagConstraints problem-moved to left and size isn't the same

    - by Damir
    I have in Java two panels which need to have same layout, there is my functions for initializations panels. private void InitializePanelCom(){ pnlCom=new JPanel(); pnlCom.setSize(300,160); pnlCom.setLocation(10, 60); add(pnlCom); GridBagLayout gb=new GridBagLayout(); GridBagConstraints gc=new GridBagConstraints(); pnlCom.setLayout(gb); jLabelcommPort = setJLabel("Com Port : "); jLabelbaudRate = setJLabel("Baud Rate : "); jLabelplcAddress = setJLabel("Plc Address : "); jLabelsendTime = setJLabel("Send Time : "); jLabelx50 = setJLabel(" x 50 ms (2 - 99)"); jComboBoxcommPort = setJComboBox(commPortList); jComboBoxbaudRate = setJComboBox(bitRateList); jTextAreaPlcAddress = setJTextField(""); jTextAreaSendTime = setJTextField(""); gc.insets = new Insets(10,0,0,0); gc.ipadx = 120; gc.weightx = 1; gc.gridx = 0; gc.gridy = 0; gc.anchor=GridBagConstraints.EAST; pnlCom.add(jLabelcommPort,gc); gc.insets = new Insets(10,0,0,0); gc.ipadx = 120; gc.weightx = 1; gc.gridx = 1; gc.gridy = 0; gc.anchor=GridBagConstraints.EAST; pnlCom.add(jComboBoxcommPort,gc); gc.insets=new Insets(10,0,0,0); gc.ipadx=120; gc.weightx=1; gc.gridx=0; gc.gridy=1; gc.anchor=GridBagConstraints.EAST; pnlCom.add(jLabelbaudRate,gc); gc.insets=new Insets(10,0,0,0); gc.ipadx=120; gc.weightx=1; gc.gridx=1; gc.gridy=1; gc.anchor=GridBagConstraints.EAST; pnlCom.add(jComboBoxbaudRate,gc); gc.insets=new Insets(10,0,0,0); gc.ipadx=120; gc.weightx=1; gc.gridx=0; gc.gridy=2; gc.anchor=GridBagConstraints.EAST; pnlCom.add(jLabelplcAddress,gc); gc.insets=new Insets(10,0,0,0); gc.ipadx=120; gc.weightx=1; gc.gridx=1; gc.gridy=2; gc.anchor=GridBagConstraints.EAST; pnlCom.add(jTextAreaPlcAddress,gc); gc.insets=new Insets(10,0,0,0); gc.ipadx=120; gc.weightx=1; gc.gridx=0; gc.gridy=3; gc.anchor=GridBagConstraints.EAST; pnlCom.add(jLabelsendTime,gc); gc.insets=new Insets(10,0,0,0); gc.ipadx=120; gc.weightx=1; gc.gridx=1; gc.gridy=3; gc.anchor=GridBagConstraints.EAST; pnlCom.add(jTextAreaSendTime,gc); gc.insets=new Insets(10,0,0,0); gc.ipadx=120; gc.weightx=1; gc.gridx=2; gc.gridy=3; gc.anchor=GridBagConstraints.EAST; pnlCom.add(jLabelx50,gc); } ![alt text][1] private void InitializePanelTcp(){ pnlTcp=new JPanel(); pnlTcp.setSize(300,160); pnlTcp.setLocation(10, 60); add(pnlTcp); GridBagLayout gb=new GridBagLayout(); GridBagConstraints gc=new GridBagConstraints(); pnlTcp.setLayout(gb); lblIPAddress=setJLabel("IP Address : "); txtIPAddress=setJTextField(""); lblPort=setJLabel("Port : "); txtPort=setJTextField(""); cmbBaudRateTCP = setJComboBox(bitRateList); lblBaudRateTCP = setJLabel("Baud Rate : "); lblParityCheck=setJLabel("Parity check : "); txtParityCheck=setJTextField(""); gc.insets = new Insets(10,0,0,0); //gc.ipadx = 20; gc.weightx = 0.3; gc.gridx = 0; gc.gridy = 0; gc.anchor=GridBagConstraints.WEST; pnlTcp.add(lblIPAddress,gc); gc.insets = new Insets(10,0,0,0); //gc.ipadx = 80; gc.weightx = 0.7; gc.gridx = 1; gc.gridy = 0; gc.anchor=GridBagConstraints.WEST; pnlTcp.add(txtIPAddress,gc); gc.insets=new Insets(10,0,0,0); //gc.ipadx=120; gc.weightx=0.3; gc.gridx=0; gc.gridy=1; gc.anchor=GridBagConstraints.WEST; pnlTcp.add(lblPort,gc); gc.insets=new Insets(10,0,0,0); //gc.ipadx=80; gc.weightx=0.7; gc.gridx=1; gc.gridy=1; gc.anchor=GridBagConstraints.WEST; pnlTcp.add(txtPort,gc); gc.insets=new Insets(10,0,0,0); //gc.ipadx=120; gc.weightx=0.3; gc.gridx=0; gc.gridy=2; gc.anchor=GridBagConstraints.WEST; pnlTcp.add(lblBaudRateTCP,gc); gc.insets=new Insets(10,0,0,0); //gc.ipadx=0; gc.weightx=0.7; gc.gridx=1; gc.gridy=2; gc.anchor=GridBagConstraints.WEST; pnlTcp.add(cmbBaudRateTCP,gc); gc.insets=new Insets(10,0,0,0); //gc.ipadx=120; gc.weightx=0.3; gc.gridx=0; gc.gridy=3; gc.anchor=GridBagConstraints.WEST; pnlTcp.add(lblParityCheck,gc); gc.insets=new Insets(10,0,0,0); //gc.ipadx=0; gc.weightx=1.7; gc.gridx=1; gc.gridy=3; gc.anchor=GridBagConstraints.WEST; pnlTcp.add(txtParityCheck,gc); } Problem is that second panel (initializetcp, second picture doesn't look the same, labels are moved at left , it is different ). Can anybody help, I am new with GridBagContsraints at all ?

    Read the article

  • Javascript Popup Windows

    - by sikas
    I have a popup window code that I have used before in login forms. The code displays an in-page popup. This is the code: <?php //In Page Popup Box with Faded Background by Jerry Low @crankberryblog.com //Find other useful scripts at the Crankberry Blog //SETTINGS $fade_amount = 60; //In Percentage $box_width = 400; $box_background = 'FFFFFF'; //Hex Color $box_border_width = 2; $box_border_color = '999999'; //Hex Color $close_box = 1; //Do You Want The Close Bar on Top 1 = Yes, 0 = No $extension = ""; // Other Variables that maybe needed, page number etc. //Begin Popup Box $left_margin = ( 0 - ($box_width*0.5) ); $page_url = basename($_SERVER['PHP_SELF']); if ($extension!="") $page_url .= '?' . $extension; if (isset($_GET['popup'])) { echo '<div class="popup" style="width:'.$box_width.'px; background: #'.$box_background.'; margin-left:'.$left_margin.'px;'; if ($box_border_width>1) echo ' border: '.$box_border_width.'px solid #'.$box_border_color.';'; echo '">'; //Close Box if ($close_box===1) echo '<div class="popup_close"><a href="'.$page_url.'">Close (x)</a></div>'; ?> <!–- START YOUR POPUP CONTENT HERE -–> Popup content goes in here! <!–- END OF YOUR POPUP CONTENT HERE -–> <?php echo '</div> <div class="fade" onclick="location.replace(\''.$page_url.'\');" style="opacity: 0.'.$fade_amount.'; -moz-opacity: 0.'.$fade_amount.';filter: alpha(opacity: '.$fade_amount.');"></div> <div class="fade_container">'; } ?> <a href="?popup=1<?php if ($extension!="") echo '&' . $extension; ?>">Activated Box</a> This code contains a link that reloads the page with parameters/arguments to show the popup. I want to update this code to make the popup appear/hide without This is what I have done so far, yet the popup doesn`t show. Now I want to update the code to work as follows. <link rel=StyleSheet href="css/popup.css" type="text/css" media=screen></link> <?php //In Page Popup Box with Faded Background by Jerry Low @crankberryblog.com //Find other useful scripts at the Crankberry Blog //SETTINGS $fade_amount = 60; //In Percentage $box_width = 400; $box_background = 'FFFFFF'; //Hex Color $box_border_width = 2; $box_border_color = '999999'; //Hex Color $close_box = 1; //Do You Want The Close Bar on Top 1 = Yes, 0 = No $extension = ""; // Other Variables that maybe needed, page number etc. //Begin Popup Box $left_margin = ( 0 - ($box_width*0.5) ); $page_url = basename($_SERVER['PHP_SELF']); if ($extension!="") $page_url .= '?' . $extension; { echo '<div id="pop_up" class="popup" style="visibility:hidden; width:'.$box_width.'px; background: #'.$box_background.'; margin-left:'.$left_margin.'px;'; if ($box_border_width>1) echo ' border: '.$box_border_width.'px solid #'.$box_border_color.';'; echo '">'; //Close Box if ($close_box===1) echo '<div class="popup_close"><a href="#" ChangeStatus()>Close (x)</a></div>'; ?> <!–- START YOUR POPUP CONTENT HERE -–> Popup content goes in here! <!–- END OF YOUR POPUP CONTENT HERE -–> <?php echo '</div> <div id="fade_div" class="fade" onclick="location.replace(\''.$page_url.'\');" style="visibility:hidden; opacity: 0.'.$fade_amount.'; -moz-opacity: 0.'.$fade_amount.';filter: alpha(opacity: '.$fade_amount.');"></div> <div class="fade_container">'; } ?> <a href="#" onClick="ChangeStatus()">Activated Box</a> <script> function ChangeStatus() { div = document.getElementById('fade_div').style.visibility; popup = document.getElementById('pop_up').style.visibility; alert(popup); if(popup == "hidden") { div = "visible"; popup = "visible"; } else { div = "hidden"; popup = "hidden"; } } </script> ignore the CSS files as it is working fine. I guess the problem is with the JS. Can anyone help me?

    Read the article

  • Magento, 1 db field not saved

    - by david parloir
    Hi there, I have a problem with 1 field of the db. With this code: $expireMonth = Mage::getStoreConfig('points_options/config_points/expiration_period', Mage::app()->getStore()->getId()); if (!is_null($expireMonth) && ($expireMonth > 0)) { $expireDate = date("Y-m-d H:i:s", strtotime("+" . $expireMonth . " month")); } else { $expireDate = NULL; } //die($expireDate); //store in points history table $this->_pointsModel->setCustomerId($this->_customer->getId()) ->setOrdersId('welcome') ->setPointsPending($pointsForNewCustomer) ->setPointsComment(Mage::helper('points')->__('welcome points')) ->setDateAdded(date('Y-m-d H:i:s')) ->setPointsStatus(2)//confirmed ->setPointsType('WE') ->setStoreId(Mage::app()->getStore()->getId()) ->setExpireDate($expireDate) ->save(); every field is saved in the table, except for expire_date. If I uncoment the die($expireData), I see the correct value, something like 2012-01-13 13:21:12. The filed is defined as: `expire_date` datetime NULL Any thaughts? edit: the solution is: $expireDate = date("Y-m-d H:i:s", strtotime("+" . $expireMonth . " months")); check out the "s" in my strtotime expression

    Read the article

  • I am validating for RegEx errors -- how can I return which keyword, it failed on?

    - by Trip
    I'm passing new objects through this set of regex : (?i)exp\s|(?i)expire\s|(?i)print|(?i)mention|(?i)spring|(?i)summer|(?i)winter|(?i)jan(\s|\.)|(?i)january|(?i)february|(?i)feb(\.|\s)|(?i)march|mar(\.|\s)|(?i)april|(?i)june|(?i)july|(?i)august|(?i)aug(\s|\.)|(?i)september|(?i)sept(\.|\s)|(?i)november|(?i)nov(\.|\s)|(?i)december|(?i)dec(\.|\s)|(?i)holiday|(?i)christmas|(?i)holloween|(?i)easter|(?i)season|(?i)ends|(?i)end If it errors, for example on the word christmas , how can I dynamically pull the word it errors on, and display it as the cause of the error?

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >