Search Results

Search found 233 results on 10 pages for 'dexter tan'.

Page 7/10 | < Previous Page | 3 4 5 6 7 8 9 10  | Next Page >

  • what is Perl equivalent of php $_POST and how to use it?

    - by dexter
    i have two perl files that is .pl files one is action.pl and another one is test.pl action.pl has a html form as: print $cgi->header, <<html; <form action="test.pl" method="post"> html while (my @row = $sth->fetchrow) { print $cgi->header, <<html; ID:<input name="pid" value="@row[0]" readonly="true"/><br/> Name: <input name="pname" value="@row[1]"/><br/> Description : <input name="pdescription" value="@row[2]"/><br/> Unit Price :<input name="punitprice" value="@row[3]"/><br/> html } print $cgi->header, <<html <input type="submit" value="update Row"> </form> html now, my question is what should i wright in test.pl so as to read what form is sending it?? in Other words what is Perl equivalent of PHP: $_POST['pid'] so that in test'pl we can read the data sent via form

    Read the article

  • What are the best settings of the H2 database for high concurrency?

    - by dexter
    There are a lot of settings that can be used in H2 database. AUTO_SERVER, MVCC, LOCK_MODE, FILE_LOCK and MULTI_THREADED. I wonder what combination works best for high concurrency setup e.g. one thread is doing INSERTs and another connection does some UPDATEs and SELECTs? I tried MVCC=TRUE;LOCK_MODE=3lFILE_LOCK=NO but whenever I do some UPDATEs in one connection, the other connection does not see it even though I commit it. By the way the connections are from different processes e.g. separate program.

    Read the article

  • When to use @Singleton in a Jersey resource

    - by dexter
    I have a Jersey resource that access the database. Basically it opens a database connection in the initialization of the resource. Performs queries on the resource's methods. I have observed that when I do not use @Singleton, the database is being open at each request. And we know opening a connection is really expensive right? So my question is, should I specify that the resource be singleton or is it really better to keep it at per request especially when the resource is connecting to the database? My resource code looks like this: //Use @Singleton here or not? @Path(/myservice/) public class MyResource { private ResponseGenerator responser; private Log logger = LogFactory.getLog(MyResource.class); public MyResource() { responser = new ResponseGenerator(); } @GET @Path("/clients") public String getClients() { logger.info("GETTING LIST OF CLIENTS"); return responser.returnClients(); } ... // some more methods ... } And I connect to the database using a code similar to this: public class ResponseGenerator { private Connection conn; private PreparedStatement prepStmt; private ResultSet rs; public ResponseGenerator(){ Class.forName("org.h2.Driver"); conn = DriverManager.getConnection("jdbc:h2:testdb"); } public String returnClients(){ String result; try{ prepStmt = conn.prepareStatement("SELECT * FROM hosts"); rs = prepStmt.executeQuery(); ... //do some processing here ... } catch (SQLException se){ logger.warn("Some message"); } finally { rs.close(); prepStmt.close(); // should I also close the connection here (in every method) if I stick to per request // and add getting of connection at the start of every method // conn.close(); } return result } ... // some more methods ... } Some comments on best practices for the code will also be helpful.

    Read the article

  • Is there a search engine that indexes source code of a web-page?

    - by Dexter
    I need to search the web for sites that are in our industry that use the same Adwords management company, to ensure that the said company is not violating our contract, as they have been accused of doing. They use a tracking code in the template of every page which has a certain domain in the URL, and I'm wondering if it's possible "Google" the source code using some bot that crawls the code rather than the content? For example, I bought an unlimited license for an image gallery, and I was asked to type the license number in a comment just before the script. I thought it was just so a human could look at the source and find out if someone paid, but it turned out that it was actually that they had a crawler looking for their source code and that comment. If it ran across the code on your site, it would look for the comment, and if it found one, it would check to see if it was an existing one. If not, it would first notify you of your noncompliance, and then notify the owner of the script. Edit: I'm looking to index HTML and JavaScript only, not the server-side languages or Java.

    Read the article

  • Using Boost on ubuntu

    - by Dexter
    I've heard a lot of good comments about Boost in the past and thought I would give it a try. So I downloaded all the required packages from the package manager in Ubuntu 9.04. Now I'm having trouble finding out how to actually use the darn libraries. Does anyone know of a good tutorial on Boost that goes all the way from Hello World to Advanced Topics, and also covers how to compile programs using g++ on ubuntu?

    Read the article

  • move file from one location to another in putty

    - by dexter
    i have created folder on my server (ie finesse)- 'home' in which i have several perl(.pl) files as tt.pl, re.pl etc. now i have created new folder in 'home' folder called 'perl' and want to move tt.pl and re.pl in perl folder is there any command to do so (like cut-paste in windows)? note: i am using putty 0.60 on windows xp

    Read the article

  • Java REST implementation: Jersey vs CXF

    - by dexter
    What do you think is the advantages/disadvantages between this two libraries? Which of these two are best suited for production environment? By the way I will be using JSON instead of XML. I also would like to know what library is most supported by the community e.g. tutorials, documentation.

    Read the article

  • What is the equivalent of PHP's $_POST in a Perl CGI script and how can I use it?

    - by dexter
    I have two Perl files: action.pl and the other is test.pl action.pl has a form: print $cgi->header, <<html; <form action="test.pl" method="post"> html while (my @row = $sth->fetchrow) { print $cgi->header, <<html; ID:<input name="pid" value="@row[0]" readonly="true"/><br/> Name: <input name="pname" value="@row[1]"/><br/> Description : <input name="pdescription" value="@row[2]"/><br/> Unit Price :<input name="punitprice" value="@row[3]"/><br/> html } print $cgi->header, <<html <input type="submit" value="update Row"> </form> html What should I write in test.pl so as to access the form values submitted by the user? In other words, what equivalent of PHP's $_POST['pid'] in Perl?

    Read the article

  • using a href (html)tag along with PHP

    - by dexter
    i have tried: <?php include("delete.php") ?> <?php .... .... .... if($result=mysql_query($sql)) { echo "<table><th>Id</th><th>Name</th><th>Description</th><th>Unit Price</th>"; while($row = mysql_fetch_array($result)) { echo "<tr><td>".$row['Id']."</td><td>".$row['Name']."</td><td>".$row['Description']."</td><td>".$row['UnitPrice']."</td> <td><a href='delproduct($row[Id])' onclick = 'return MsgOkCancel()'>Delete</a></td></tr>"; echo "<br/>"; } } ?> following javascript is in the same page: <script type="text/javascript" language="javascript"> function MsgOkCancel() { if (confirm("Are You Sure You Want to Delete?")) { return true } else {return false} } </script> where delproduct is a javascript function in delete.php written like: <script type="javascript"> function delproduct(Id) { alert('Id '+ Id); } <script> ** after ** clicking Delete a okcancel message-box appear asking conformation ** but ** after clicking 'ok' it should execute statements inside delproduct function but it doesn't it gives error like: Object Not Found :The requested URL was not found on this server. what would be the problem? pls help, thanks

    Read the article

  • Programatically creating site using custom template

    - by dexter
    hi, Help plz! How can I make a webpart that has a button called "Create Site" and it programatically create a site (using my own custom template e.g. Mytemplate.STP) ? The reason is of such task is, I dont want user to go into "Sites Action" - create Site - and then fill the whole form. I want to give a user an easy interface with only title field, the rest i want to be done programatically. Any other suggestions or work arounds are also appreciated. Thank you

    Read the article

  • Find first cell in a row that contains a number?

    - by Dexter
    I'm working in Excel with an exported table such as this: |-------------------------------------------------------------------------------| | | A | B | C | D | E | F | G | H | I | |---|-------------------|-----|-----|-----|-----|-----|-------|-----|-----------| | 1 | Domain | JAN | FEB | MAR | APR | MAY | Start | End | Change | |---|-------------------|-----|-----|-----|-----|-----|-------|-----|-----------| | 2 | www.mydomain1.com | | 1 | 4 | 3 | 1 | 1 | 1 | 0 | |---|-------------------|-----|-----|-----|-----|-----|-------|-----|-----------| | 3 | www.mydomain2.com | 2 | 4 | 12 | 18 | 23 | 2 | 23 | 21 | |---|-------------------|-----|-----|-----|-----|-----|-------|-----|-----------| | 4 | www.mydomain3.com | | | 14 | 12 | | 14 | xxx | NOT FOUND | |-------------------------------------------------------------------------------| I'm trying to compare the current state (last cell) to the original cell (first cell with a value). In column I, I have the formula =IF(G2 = "xxx", "NOT FOUND", IF(H2 = "xxx", "NOT FOUND", H2 - G2)) In column H, I have the formula =IF(F2 = "", "xxx", F2) In column G, I need to find the first cell with a number. If there isn't one in that range, I need G to be "xxx". I suppose I only need to check for the first cell in the range (B2 to F2) that contains a value, not just a number. I tried using an Index and Match combo, but I couldn't quite understand it.

    Read the article

  • how to deal with async calls in Ajax 4.0(using jquery?)

    - by dexter
    in my code i have done something like this. $.get('/Home/Module/Submit', { moduleName: ModName, moduleParameters: moduleParameters }, function(result) { $("#" + target).html(result); }); when i put alert in the function(result) {..} it shows html perfectly(both in alert and at the 'target'-on the .aspx page) BUT when i remove the alert.. on the page the 'html' don't appear or appear randomly (this method is called multiple times) i think that the 'result' comes to function asynchronously thats why it is not bind with the respective 'div' however in the last iteration it gets bind every time. can we make process stop until data gets bind? or is there any functionality (like alert) which can make data bind.. without disturbing UI (unlike alert)?

    Read the article

  • How can I identify an argument as a year in Perl?

    - by dexter
    I have created a file argument.pl which takes several arguments first of which should be in form of a year For example: 2010 23 type. Here 2010 is a year my code does something like: use strict; use warning use Date::Calc qw(:all); my ($startyear, $startmonth, $startday) = Today(); my $weekofyear = (Week_of_Year ($startyear,$startmonth,$startday))[0]; my $Year = $startyear; ... ... if ($ARGV[0]) { $Year = $ARGV[0]; } Here this code fills $Year with "current year" if $ARGV[0] is null or doesn't exist. now here instead of if ($ARGV[0]) Is it possible to check that the value in $ARGV[0] is a valid year (like 2010, 1976,1999 etc.)?

    Read the article

  • Japan Welcomes Oracle Enterprise Manager 12c

    - by Anand Akela
    Following Oracle’s grand unveiling of Oracle Enterprise Manager 12c at Oracle OpenWorld 2011 in San Francisco, Oracle Japan just completed their launch for the product. Leng Tan, Oracle VP of Products, delivered the keynote with collaboration from a number of key partners in the region. From left to right: Leng Tan, VP of Products, Oracle; Shinyashiki-san, Assistant General Manager, NEC; Fuketa-san, General Manager, HITACHI; Fujii-san, General Manager, Fujitsu; Misawa-san, VP of Alliances, Oracle Japan NEC, Hitachi and Fujitsu have been among Oracle’s most active partners in the Japan region. They have received key awards from Oracle Japan for their efforts. NEC received the partner of the year award for 2010 and 2011. Hitachi received the partner of the year award for Oracle Enterprise Manager in 2011. Fujitsu received awards in the areas of Database and Oracle Exadata in 2011. All three partners were active participants in Oracle Enterprise Manager 12c beta program. According to Hirai-san, the technical lead at the event, there were over 200 attendees. “The event was so well-attended; there was no room to stand.” Said Hirai-san. Hirai-san demonstrating Oracle Enterprise Manager 12c at the Oracle Japan launch Here’s the highlight of the presentations made by the Oracle partners during this launch. NEC has developed an Oracle Enterprise Manager Plug-in for iStorage (NEC SAN Storage product). Additionally, NEC’s WebSAM Invariant Analyzer management tool is now capable of integrating with Oracle Enterprise Manager HITACHI demonstrated monitoring capabilities for Oracle Exadata through Oracle Enterprise Manager in their JP1 system management tool Fujitsu’s Oracle Enterprise Manager 10g adapter for their SystemWalker tool has now been enhanced to work with Oracle Enterprise Manager 12c. Following a very successful launch in Japan, Oracle’s Total Cloud Control road show and additional Oracle Enterprise Manager 12c launches continue in the EMEA and Asia Pacific regions. This week Sushil Kumar, VP of Product Strategy and Business Development is scheduled to deliver the keynotes at several cities in India. Also this week, Richard Sarwal, SVP of Products, is scheduled to deliver a keynote at the DOAG conference in Nuremburg, Germany. Richard is also delivering the Oracle Enterprise Manger 12c launch event keynote in Paris on November 18th. Check out our event schedule for Oracle Enterprise Manager 12c events across the globe! For more information, please go to Oracle Enterprise Manager  web page or  follow us at :  Twitter   Facebook YouTube Linkedin

    Read the article

  • Build a view frustum from angles

    - by MulletDevil
    I have 4 angles, left, right, top & bottom. These angles are in degrees. They define the angle between the forward vector and the corresponding side. I am trying to use these to calculate the required values for Perseective Off Centre function found here http://docs.unity3d.com/Documentation/ScriptReference/Camera-projectionMatrix.html I tried doing (near plane-far plane) * Tan(angle) But that didn't give the correct results.

    Read the article

  • Remove gradients from elementary theme?

    - by John
    I really don't like the gradients in the elementary theme, and I was wondering if there were a way to remove them, from applications like Nautilus-Elementary, Postler, Dexter, etc. I've tried commenting out the Apps/[Application].rc in /usr/share/themes/elementary/gtk-2.0/gtkrc but it doesn't work, still leaves the gradients in their place. I'm a big fan of the other controls in the theme; the scroll bar, the way it borders gedit and the buttons, and I'd like to keep these features, but I don't like the way it styles its windows. Thanks for any help, as always!

    Read the article

  • How can I remove gradients from Elementary theme?

    - by John
    I really don't like the gradients in the Elementary theme and I was wondering if there is a way to remove them from applications like Nautilus-Elementary, Postler, Dexter, etc. I've tried commenting out the Apps/[Application].rc in /usr/share/themes/elementary/gtk-2.0/gtkrc but it doesn't work. It still leaves the gradients in their place. I'm a big fan of the other controls in the theme: the scroll bar, the way it borders gedit and the buttons, and I'd like to keep these features, but I don't like the way it styles its windows. EDIT: The gradients I'm talking about are the ones at the top of the window. Some examples: Nautilus-Elementary: Postler: Rhythmbbox: Transmission: I'd like to create a sort of matte look, similar to this, which was done using Orta: Nautilus-Elementary: Postler: Rhythmbox: Transmission: I'd like a flat color, preferably without the line separating the top part of the application with the bottom.

    Read the article

  • Ray Generation Inconsistency

    - by Myx
    I have written code that generates a ray from the "eye" of the camera to the viewing plane some distance away from the camera's eye: R3Ray ConstructRayThroughPixel(...) { R3Point p; double increments_x = (lr.X() - ul.X())/(double)width; double increments_y = (ul.Y() - lr.Y())/(double)height; p.SetX( ul.X() + ((double)i_pos+0.5)*increments_x ); p.SetY( lr.Y() + ((double)j_pos+0.5)*increments_y ); p.SetZ( lr.Z() ); R3Vector v = p-camera_pos; R3Ray new_ray(camera_pos,v); return new_ray; } ul is the upper left corner of the viewing plane and lr is the lower left corner of the viewing plane. They are defined as follows: R3Point org = scene->camera.eye + scene->camera.towards * radius; R3Vector dx = scene->camera.right * radius * tan(scene->camera.xfov); R3Vector dy = scene->camera.up * radius * tan(scene->camera.yfov); R3Point lr = org + dx - dy; R3Point ul = org - dx + dy; Here, org is the center of the viewing plane with radius being the distance between the viewing plane and the camera eye, dx and dy are the displacements in the x and y directions from the center of the viewing plane. The ConstructRayThroughPixel(...) function works perfectly for a camera whose eye is at (0,0,0). However, when the camera is at some different position, not all needed rays are produced for the image. Any suggestions what could be going wrong? Maybe something wrong with my equations? Thanks for the help.

    Read the article

  • Accelerometer gravity components

    - by Dvd
    Hi, I know this question is definitely solved somewhere many times already, please enlighten me if you know of their existence, thanks. Quick rundown: I want to compute from a 3 axis accelerometer the gravity component on each of these 3 axes. I have used 2 axes free body diagrams to work out the accelerometer's gravity component in the world X-Z, Y-Z and X-Y axes. But the solution seems slightly off, it's acceptable for extreme cases when only 1 accelerometer axis is exposed to gravity, but for a pitch and roll of both 45 degrees, the combined total magnitude is greater than gravity (obtained by Xa^2+Ya^2+Za^2=g^2; Xa, Ya and Za are accelerometer readings in its X, Y and Z axis). More detail: The device is a Nexus One, and have a magnetic field sensor for azimuth, pitch and roll in addition to the 3-axis accelerometer. In the world's axis (with Z in the same direction as gravity, and either X or Y points to the north pole, don't think this matters much?), I assumed my device has a pitch (P) on the Y-Z axis, and a roll (R) on the X-Z axis. With that I used simple trig to get: Sin(R)=Ax/Gxz Cos(R)=Az/Gxz Tan(R)=Ax/Az There is another set for pitch, P. Now I defined gravity to have 3 components in the world's axis, a Gxz that is measurable only in the X-Z axis, a Gyz for Y-Z, and a Gxy for X-Y axis. Gxz^2+Gyz^2+Gxy^2=2*G^2 the 2G is because gravity is effectively included twice in this definition. Oh and the X-Y axis produce something more exotic... I'll explain if required later. From these equations I obtained a formula for Az, and removed the tan operations because I don't know how to handle tan90 calculations (it's infinity?). So my question is, anyone know whether I did this right/wrong or able to point me to the right direction? Thanks! Dvd

    Read the article

  • Cannot change font size /type in plots

    - by Sameet Nabar
    I recently had to re-install my operating system (Ubuntu). The only thing I did differently is that I installed Matlab on a separate partition, not the main Ubuntu partition. After re-installing, the fonts in my plots are no longer configurable. For example, if I ask the title font to be bold, it doesn't happen. I ran the sample code below on my computer and then on my colleague's computer and the 2 results are attached. This cannot be a problem with the code; rather in the settings of Matlab. Could somebody please tell me what settings I need to change? Thanks in advance for your help. Regards, Sameet. x1=-pi:.1:pi; x2=-pi:pi/10:pi; y1=sin(x1); y2=tan(sin(x2)) - sin(tan(x2)); [AX,H1,H2]=plotyy(x1,y1,x2,y2); xlabel ('Time (hh:mm)'); ylabel (AX(1), 'Plot1'); ylabel (AX(2), 'Plot2'); axes(AX(2)) set(H1,'linestyle','none','marker','.'); set(H2,'linestyle','none','marker','.'); title('Plot Title','FontWeight','bold'); set(gcf, 'Visible', 'off'); [legh, objh] = legend([H1 H2],'Plot1', 'Plot2','location','Best'); set(legend,'FontSize',8); print -dpng Trial.png; Bad image: http://imageshack.us/photo/my-images/708/trial1u.png/ Good image: http://imageshack.us/photo/my-images/87/trial2.png/

    Read the article

  • IIS 7 (Windows Server 2008) no entrega javascript ni css

    - by José Marcos García Espinosa
    Hace algunos días, jugando con las configuraciones del IIS, revolvíamos las opciones de compresión de contenidos. La intención era habilitar gzip para el contenido estático pero la cosa salió tan mal que el portal, en vez de reducir su tamaño por los contenidos comprimidos, lo "redujo" porque el servidor dejó de enviar los archivos javascript y las hojas de estilo al navegador. Después de estar buscando como hora y media, resultó que la explicación y la solución eran bastante sencillas (y ni siquiera las encontramos nosotros): Al estar cambiando las opciones de compresión de contenidos estáticos del IIS, se crearon unos archivos de configuración (web.config's) tanto en la carpeta de los archivos javascript como en la de las hojas de estilo, que es una estructura que el propio IIS no reconocía y dejaba la aplicación 'cortada', dejando fuera estas carpetas. Eliminar ambos archivos de configuración bastó para volver a visualizar el portal como se debía.. de la compresión, creo que ya ni seguimos buscando.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10  | Next Page >