on-internet

not found showing twice in 404 page?

in the 404.php page my original message is showing correctly, but i also get a second message in the footer, I checked all files and googled a lot about this issue but got no results. this is the live example: http://www.rapyemen.org/?page_id=181 can anyone help to to solve this issue of getting two 404 messages? this is my 404.php code: <div id="container"> <?php // action hook for placing content above #content nd_abovecontent(); // filter for manipulating the element that wraps the content echo apply_filters( 'nd_open_id_content', '<div id="content">' . "\n\n" ); // action hook for placing

Join the discussion →

How to load a custom CodeIgniter library then access its instantiated object

I have a library file named myMenu.php <?php class myMenu { function show_menu() { $obj = & get_instance(); $obj->load->helper('url'); $menu = "<ul>"; $menu .= "<li>"; $menu .= anchor('books/index','List of books'); $menu .= "</li>"; $menu .= "<li>"; $menu .= anchor('books/input', 'Books entry'); $menu .= "</li>"; $menu .= "</ul>"; return $menu; } } Now I loaded this library in my controller books.php function index() { $this->load->library('myMenu'); $menu = new myMenu; $data['menu'] = $menu->show_menu(); $this->load->view('main_view',$data); } But the page shows error: An error occurred : Un

Join the discussion →

PostgreSQL equivalent of Oracle's PERCENTILE_CONT function

Has anyone found a PostgreSQL equivalent of Oracle's PERCENTILE_CONT function? I searched, and could not find one, so I wrote my own. Here is the solution that I hope helps you out. The company I work for wanted to migrate a Java EE web application from using an Oracle database over to using PostgreSQL. Several stored procedures relied heavily upon using Oracle's unique PERCENTILE_CONT() function. This function does not exist in PostgreSQL. I tried searching to see if anyone had "ported over" that function into PG to no avail.

Join the discussion →

Use case for low-level os.open, os.fdopen, and friends?

In Python 3.2 (and other versions), the documentation for os.open states: This function is intended for low-level I/O. For normal usage, use the built-in function open(), which returns a file object with read() and write() methods (and many more). To wrap a file descriptor in a file object, use fdopen(). And for fdopen(): Return an open file object connected to the file descriptor fd. This is an alias of open() and accepts the same arguments. The only difference is that the first argument of fdopen() must always be an integer. This comment in a question on the difference between io.open and os

Join the discussion →

CSS Is Not Importing into HTML

I must be tired. CSS isn't importing into HTML. All that shows up is: Test Test Test(On different lines) Also, in the grid CSS all there is is the 920.gs: <!DOCTYPE html> <html> <head> <title>Some title</title> <link rel="stylesheet" type="text/css" href="/css/styles.css" /> </head> <body> <div class="container_12" id="content"> <div class="grid_3" id="leftside"> <h1>Test</h1> </div> <div class="grid_6"> <h1>Test</h1> </div> <div class="grid_3" id="rightside"> <h1>Test</h1> </div> </div> </body> </html> Annnd the CSS: @import url("http://fonts.googleapis.com/css?family=Days+One&effect=font-eff

Join the discussion →

How can feature selection methods be evaluated? [closed]

Hello, How can I choose the best fit feature selection method for a given dataset (textual data) ? In Weka for example, there are several attribute selection methods (CfsSubsetEval, ChiSquaredAttributeEval, ... etc), and several search methods (bestfirst, greedy, ranker ... etc). My Question: How can I know which attribute selection method and search method is best for a given dataset ?! My Guess: Should I use cross validation to test the dataset after applying the feature selection filter ? so for example, that means if i have 10 attribute selection methods and 10 search methods, I will need

Join the discussion →

How to find a commit by its hash?

I need to find a commit in Git by a given hash, SHA. For example, if I have the "a2c25061" hash, and I need to get the author and the committer of this commit. What is the command to get that?

Join the discussion →

master detail using form and datagridview

I'd like to do a master/detail page where the parent (customer info) is a form on the top half of the window and then a datagridview of orders on the lower half of the screen? I found an article where the example uses 2 datagridviews here and trying to go from there. I'm starting out with single textbox that contains the ParentID (I'm using Northwind Customer/Orders). And this works just fine with existing records. How do I handle wanting to add a new Customer and Orders at the same time? using System; using System.Data; using System.Data.SqlClient; using System.Windows.Forms; namespace Window

Join the discussion →

Measuring Intensity Using ImageJ

we have to measure the intensity of the fluorescence in certain regions of images using imagej. we came up with the below steps to measure the intensity. while it does seem correct, my question is --> are we actually measuring intensity correctly using the following steps or are we erroneously measuring something else and believing that that value is the intensity? Make the image a 8-bit Threshold the image (Image > Adjust > Threshold) to outline all the regions and click Apply Open Analyze > Analyze particles. Make sure “add to manager” is clicked Analyze > Analyze particles > Show > Bare Out

Join the discussion →

How do I Configure two https connector port in jboss 7?

I need to configure 2 https ports (5480 and 8443) in jboss 7 ( I did this jboss 5 adding one more connector port). I tried creating two https connector ports in standalone-full.xml but it did not work. Following is my current configuration for 8443 https port and I need another port 5480 as well. <subsystem xmlns="urn:jboss:domain:web:1.2" default-virtual-server="default-host" native="false"> <connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" secure="true"> <ssl key-alias="tomcat" password="FOO@Bar-1" certificate-key-file="${jboss.server.config.dir}/keystore" cip

Join the discussion →

How To Automate "Right click" event in Selenium IDE and opening the link in New window/tab

I am using Selenium IDE for a google search scenario. 1 open google 2 then type "india" and click on the search button 3 then go to any link and right clicking on that link and open that link in new tab or window what I have done till now is <tr> <td>open</td> <td>/</td> <td></td> </tr> <tr> <td>type</td> <td>id=gbqfq</td> <td>india</td> </tr> <tr> <td>click</td> <td>id=gbqfb</td> <td></td> </tr> <tr> <td>contextMenu</td> <td>//*[@id='rso']/li[3]/div/h3/a</td> <td> </td> </tr> What I am not able to do is: right click on the link and then open that link in new window. Can anyone please suggest

Join the discussion →

embed a YouTube 'like' button on a website

Is it possible to display YouTube's like/dislike buttons and subscribe channel features with the video on my site even if the user is not logged in? I found that I can use an iframe and css to crop out the like button from the video page on YouTube and display it in a borderless iframe on my webpage, but I don't need to it in this way . Also I've checked this player demo https://developers.google.com/youtube/youtube_player_demo but the controls needs to be loggedin to appear. I'm using this library https://developers.google.com/youtube/articles/codeigniter_library

Join the discussion →

imagecreatefromjpeg not working

Hello i have little problem with image showing after making it object. I'm still learning to use object images. So here is my code: $what = getimagesize($file); switch(strtolower($what['mime'])){ case 'image/png' : $src_id = imagecreatefrompng($file); imagesavealpha($src_id,true) ; break; case 'image/jpeg': $src_id = imagecreatefromjpeg($file); break; case 'image/gif' : $old_id = imagecreatefromgif($file); $src_id = imagecreatetruecolor($what[0],$what[1]); imagecopy($src_id,$old_id,0,0,0,0,$what[0],$what[1]); break; default: die(); } header('Content-Type: image/jpeg'); imagejpeg($scr_id); imag

Join the discussion →

Apache Mod_Rewrite - Redirect losing POST data - 405 error

Stackoverflow users, I have an Apache application that needs to accept data POSTed to the following paths: /sample/HostChange/Submit /sample/HostChange/SubmittoAPI I'm currently using the following 301 redirect rules. This is not what I want as as the POST gets redirected and the second request is a GET loosing all the data. I am seeing the 301 request go the correct url but the second request is a GET and causes a 405 response code. .htaccess: RewriteEngine On Redirect 301 /sample/HostChange/Submit /event Redirect 301 /sample/HostChange/SubmittoAPI /date I'm sure using a Redirect is the issue

Join the discussion →

How to remove anchors tags from html using php querypath [duplicate]

I'm working with php Querypath and I'm trying to remove anchor tags with particular href from html. for example <html> <body> <div> <a href="#down"></a> <a href="#top" ><img src="img.png" /> </a> <a href="#top" ><img src="img.png" /> </a> </div> </body> </html> my output should be <html> <body> <div> <a href="#down"></a> </div> </body> </html> Anchors with href top should be removed. I tried with following Code $html = qp($html)->find("a#top")->remove()->writeHTML(); But it didn't remove following anchors. Please let me know how to achieve this in php query path. Thanks a lot for the help.

Join the discussion →

How do I add a box-shadow to an element in QT?

I tried to do: this->setStyleSheet("-webkit-box-shadow: 0px 0px 20px rgba(0, 0, 0, 1);") and I get the error: Unknown property -webkit-box-shadow. The same goes for box-shadow and -moz-box-shadow. Box-shadow, however, renders fine in a QWebView. Is there no way to add this effect to normal elements?

Join the discussion →

wget - does -nc option skip downloading existed files?

I'm downloading a website with wget. the command is as below : wget -nc --recursive --page-requisites --html-extension --convert-links --restrict-file-names=windows --domain any-domain.com --no-parent http://any-domain.com/any-page.html does -nc option skip downloading existed files even when we download a website recursively? It seems -nc option not works.

Join the discussion →

Netbeans and glassfish HTTP ERROR 404

I need your help. I had made a source code for a web appl but I have this error when I click on the "add" submit button and I have the same error on the others submit button. My source code is : filoptwxoinfo.jsp : <%-- Document : index Created on : 17 Δεκ 2012, 6:39:05 μμ Author : Editor --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Πληροφορίες Φιλοπτώχου</title> </head> <body> <table border="1"> <td><a href="filoptwxoinfo.jsp">Μέλη Φιλοπτώχου</a></td> <td><a href="./FullFilo

Join the discussion →

Where to start with Direct2d?

Interested in learning Direct2d to create a Windows 8 app, but after 2 hours of research I'm thoroughly confused. Samples like this (Creating a Simple Direct2D Application) seem to assume you know what an HWND and HRESULT is, and how the Windows API works in general. My question is this: do you need an understanding of the Win API, COM, OLE, and all this other Windows stuff in order to get a good grasp on Direct2d/3d? All the other barebones tutorials assume that you know all this stuff and I don't really know where to start. The startup D2D project in VS 2012 gives you a bunch of files but th

Join the discussion →

symlink directory

Can I get an eyeball on my symlink? I'm trying to download a file from one directory, while the file actually exists in another. I've got the actual file, and the symlink in seperate subdirectories, but both reside in the public html(both are web accessible). I've verified the file and file location on my (shared Linux) server by going to the file directly. The link is being created (I've used readlink, is_link, and linkinfo), and I can see it when I FTP in. I believe I am probably just having a misunderstanding of the directory structure. I put the file here: ./testdownload/ I put the symlink

Join the discussion →

Update ViewBag with jQuery and rendering results

I have an MVC3 application which uses ViewBag variables to dynamically fetch data from database and dynamically generate the interface. I am using jQuery to call action method to insert some values to the database and update a ViewBag variable accordingly. I want to refresh the div with the new ViewBag values returned after the update from server...Cant really figure how to do that. Thanks This is my View code: <div id="phys"> <fieldset> <legend>IPSS</legend> @foreach (var parameter in ViewBag.four.Parameters) { @MyHelpers.ParameterList(parameter, ViewBag.four.ParametersValues, "ParametersList

Join the discussion →

Fancybox Image Gallery

I have the following code in an iframe and I made it display in the parent but now I don't know how I can group the images like image gallery in fancybox example. I saw this in an example: $(document).ready(function() { $('.imagen').click(function(e){ e.preventDefault(); parent.$.fancybox([ {href:'images/01.jpg', title: '01'}, {href:'images/02.jpg', title: '02'}, {href:'images/03.jpg', title: '03'} ],{ // href: this.href, helpers: { overlay: {............... but I do not want that because links are going to be dynamic. I would like to use something like $(".fancybox") .attr('rel', 'gallery') a

Join the discussion →

Where can I find a reference for what every bit of the CorFlags value means?

I'm messing around with some rather low level things and trying to determine why I get different outputs with the CorFlags.exe utility. For reference, the outputs are as so: $ corflags test2.exe Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 4.0.30319.17929 Copyright (c) Microsoft Corporation. All rights reserved. Version : v4.0.30319 CLR Header: 2.5 PE : PE32 CorFlags : 0x1 ILONLY : 1 32BITREQ : 0 32BITPREF : 0 Signed : 0 $ corflags test.exe Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 4.0.30319.17929 Copyright (c) Microsoft Corporation. All rights reserved.

Join the discussion →

How to verify that an archive produced by pg_dump is OK and valid?

I am working on backup/restore data from postgresql for what I use pg_dump.exe and pg_restore.exe. In order to restore backup file I have to delete actual tables in database what can be "suicidal job" if something with dumped file isn't OK. I can check dumped file for integrity with (say) '7z t mydump.gz' what I do like first test. But I would like to know, because this archive is original PG archive did PostgreSQL contain any technique to check this '.gz' archive which I can take before deleting actual tables? And if do, how to do a proper check? EDIT: This is my actual command for dumping: "

Join the discussion →

Can web server send data to desktop application without request?

I have several PC's on each of them I set small swing application that get data with JSON request to one web server. Can I receive the data from web server without to send request to the web server, with other words can the Web server send the data without the Java application to ask for this?

Join the discussion →
Older stories