on-internet

Facebook login for wordpress without a plugin

I'm providing a custom login page for the website visitors and would like to include the Login with Facebook button such that the application checks if the user email is registered, and if so it will log the user in. using wp_signon I can log a user in by providing the email and password, but in that case I don't have a password for the user, so is there a way I can provide a Facebook login button without using plugins?

Join the discussion →

Eclipse: An internal error occurred during: "Updating Maven Project". org/apache/maven/plugin/war/util/MappingUtils

Adding a dependency on pom.xml and updating via Maven -> Update Project I get this error (see .log below) !ENTRY org.eclipse.core.jobs 4 2 2012-08-22 10:04:31.078 !MESSAGE An internal error occurred during: "Updating Maven Project". !STACK 0 java.lang.NoClassDefFoundError: org/apache/maven/plugin/war/util/MappingUtils at org.maven.ide.eclipse.wtp.namemapping.PatternBasedFileNameMapping.mapFileName(PatternBasedFileNameMapping.java:36) at org.maven.ide.eclipse.wtp.WebProjectConfiguratorDelegate.configureClasspath(WebProjectConfiguratorDelegate.java:367) at org.maven.ide.eclipse.wtp.WTPProjectCon

Join the discussion →

Classifying a Distribution of Points for Object Identification

I have some points that I need to classify. Given the collection of these points, I need to say which other (known) distribution they match best. For example, given the points in the top left distribution, my algorithm would have to say whether they are a better match to the 2nd, 3rd, or 4th distribution. (Here the bottom-left would be correct due to the similar orientations) I have some background in Machine Learning, but I am no expert. I was thinking of using Gaussian Mixture Models, or perhaps Hidden Markov Models (as I have previously classified signatures with these- similar problem). I

Join the discussion →

format string as table in javascript

Is it possible to achieve this in javascript? Here is the format: 1 ITEM1 9.00 0% 9.00 1 ITEM-GET01 8.00 12% 5.00 I would like to create a receipt like layout. I'm using backbone.js so there will be models and collection involve. Also if it were on a table can I use jquery to get the data from the table tr then have the result just like what is posted above? I was able to read about sprintf but I don't think it it is the one I need. any ideas? UPDATE I'm trying out sprintf here is what i've come so far var result = sprintf("%d %-s %.2f %d%% %.2f", model.get("Qty"), model.get("Itemname"), model

Join the discussion →

Sharing dynamic client and server-side content between JSP's

I've done quite a lot of searching about capabilities of JSPs and have been unable to find a concise answer to my issue. I am currently writing a web application which uses a single jsp (with an imported CSS) to build a site with multiple functionalities. Specifically, the application has the ability to read and write data from/to an external server, as well as update user content and info. For the sake of aesthetics and clarity, it makes the most sense to designate different areas of the site to each of these tasks, one at a time. Rather than attempt to use page divisions and conditional stat

Join the discussion →

Selecting the most recent date from a table in PeopleSoft using Peoplesoft Query (Max() doesn't work)

I am building a query in people soft using Peoplesoft query manager. I am trying to pull the most recent date from the date column. I have tried using max() as an expression, however, the query doesn't pull any records. I have checked with another co-worker and they have never been able to pull records using max(). Is there any other way or workaround to pull the most recent record?

Join the discussion →

Oracle Ref cursor along with out parameters

I have a requirement to have a IN OUT parameter along with a reference cursor as a return from a stored procedure. Currently I am doing following. create table dept ( dept_id number, name varchar2(40), location varchar2(200) ); CREATE OR REPLACE PACKAGE HR.SP_PACKAGE AS TYPE dept_type IS REF CURSOR RETURN HR.dept%ROWTYPE; END SP_PACKAGE; CREATE OR REPLACE PROCEDURE HR.MIXED_IN_INOUT_REF_PARAM ( P_ID IN NUMBER , P_NAME_TO_LOCATION IN OUT VARCHAR2 , P_RCURSOR OUT SP_PACKAGE.dept_type ) AS BEGIN SELECT name INTO P_NAME_TO_LOCATION FROM HR.dept WHERE dept_id = p_id AND name = P_NAME_TO_LOCATION; O

Join the discussion →

Google adsense account not approved

I have created a Web Portal bugnull.com and applied for the Adsense account, but my Adsense account is not approved as I received the email that my site is not meeting the Google guidelines.Review my site and tell me what is wrong in my site and what kind of improvement I should made so that I can have approved Adsense account.

Join the discussion →

WordPress WP_ajax not working

Have been looked at the WP ajax documentation for hours now and still can't figure this out. I am working on a plugin and this is for updating it's options without having to refresh the page. I've managed to accomplish it through wp-load, but know thats bad practice and would like to do it correctly. I will be moving the javascript to a separate .js file, once I have everything up and working. All of the code is in on single page. Trying to update some options via ajax and it just is not working. The response is saying its successful, but the current_form option is not being updated. Any help

Join the discussion →

How to list all distribution groups with name, grouptype, managedby, and AD description

I am trying to get a list of all distribution groups with name, grouptype, managedby, and AD description. get-distributiongroup | select-object name, GroupType, managedby, @{Name="Description";expression={get-qadgroup $_.name | select-object description}} This works for the most part, but the description column returns the object, not just the description. How do I get this to only return the description using powershell with QAD and exchange snapins (if needed)? Thanks!

Join the discussion →

How to add line break into XML file with Java?

How to add line break after the "do not edit this file" comment? I've tried to add textnode with line break but it doesn't work. Code: import java.io.File; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.w3c.dom.Document; import org.w3c.dom.Element; public class Main { public static void main(String[] args) { try { final Document doc = DocumentBuilderFactory.newInstance

Join the discussion →

Read the HTTP POST request of HttpWebRequest

I need to create Http POST requests and maybe a few GET requests as strings for some tests I am writing. Currently, my tests build them using a StringBuilder and hardcoded POST requests pulled out from fiddler kinda like this: var builder = new StringBuilder(); builder.Append("POST https://some.web.pg HTTP/1.1\r\n"); builder.Append("Content-Type: application/x-www-form-urlencoded\r\n"); builder.Append("Referer: https://some.referer.com\r\n"); builder.Append("Accept-Language: en-us\r\n"); builder.Append("Accept-Encoding: gzip, deflate\r\n"); builder.Append("User-Agent: Mozilla/5.0 (compatible;

Join the discussion →

Cause of Range Check Error (Delphi)

Here's a condensed version of some code that causes both a Range check error and an overflow error, should I turn on those compiler check directives. I understand why this would cause an overflow, on the multiplication of C1, it seems likely it might exceed the data-type's max valude. But why would this also trigger a Range-check error? Delphi's documentation and other posts on stack overflow make it sound like range-check errors are usually for array accesses that are out of bounds. But I'm not accessing an array on the line it's saying is causing the range-check error. Perhaps its on the ass

Join the discussion →

How to open Default Browser settings from my android application?

As per my requirement I have to clear default browser cache from my application. I want to open browser settings from my application, so that user can clear the cache. By using following code. startActivityForResult(new Intent(android.provider.Settings.ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS), 0); I'm able to open all manage applications. Is there any way to open browser settings directly? Thanks

Join the discussion →

Datatransfer in Chrome

I am implementing dragging an image from thumbnail and dropping into a canvas and draw it. I have used datatransfer.setdata() during the event ondragstart and datatransfer.getdata() on event ondrop. It is working perfectly in Firefox, but doesn't work in Chrome. I have come to know that in Chrome datatransfer is not supported. So, what can be a good solution, that should be cross browser compatible too! function dragIt(event) { event.dataTransfer.setData("URL", event.target.id) }; function dropIt(event) { var theData = new Image(); theData = event.dataTransfer.getData("URL"); dt = document.get

Join the discussion →

getting exception: The Network Adapter could not establish the connection in simple jdbc program

I was trying to run a simple jdbc code [ using jdk 1.6, oracle 10g] as, package javaapplication2; import java.text.*; import java.sql.*; import java.io.FileWriter; import java.io.PrintWriter; import java.io.BufferedWriter; /** * @author animark */ public class CallableStatementEx1 { public CallableStatementEx1(){;} public static void main(String s[]) throws Exception { try { Class.forName("oracle.jdbc.driver.OracleDriver").newInstance(); Connection con=null; String url= "jdbc:oracle:thin:@//localhost:1521:orcl" ; con = DriverManager.getConnection(url,"scott","password"); String query="update e

Join the discussion →

How to edit data in GridView using asp.net MVC?

I am binding data to the gridview from SQL server but having some issues with the Edit. Here is my model code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data; using System.Data.SqlClient; using System.Data.Entity; namespace Gridview_BugTracker.Models { public class BugTracker_DataHelper { public static List<BugTracker_DataHelper> GetList{get;set;} public string ProjectId { get; set; } public string projectName { get; set; } public string Description { get; set; } public string status { get; set; } } } Here is my controller code using Syst

Join the discussion →

Android change PDF pages in PDF Viewer

I need to use PDF-Viewer in my app. I took many APIs as a reference but I'm still stuck in viewing PDF files from SDCARD. Here is my code: First.java public class First extends ListActivity { String[] pdflist; File[] imagelist; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //setContentView(R.layout.main); File images = Environment.getExternalStorageDirectory(); imagelist = images.listFiles(new FilenameFilter() { public boolean accept(File dir, String name) { return ((name.endsWith(".pdf"))); } }); pdflist = new String[imagelist.length]; for (in

Join the discussion →

Android-Code to Implement PDF Viewer

Here i need to use Pdf-Viewer in my app.i took many API as a reference but still stucking up in viewing Pdf files from SDCARD. here my code `First.java public class First extends ListActivity { String[] pdflist; File[] imagelist; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //setContentView(R.layout.main); File images = Environment.getExternalStorageDirectory(); imagelist = images.listFiles(new FilenameFilter() { public boolean accept(File dir, String name) { return ((name.endsWith(".pdf"))); } }); pdflist = new String[imagelist.length]; for (

Join the discussion →

Crystal Reports: suppress details sections conditional on page number

I have a Crystal Reports question on suppressing different details sections, appreciate any help you could give. I have 2 details sections, A and B, and I want detailsA to show only on page 1 and detailsB to show only on page 2, but I can't get it to work using conditional suppressing. For detailsA I suppressed based on the following formula: if pagenumber = 1 then formula = false else formula = true end if And similarly for the detailsB. But when I then go to print this, it only shows page 1 (with detailsA only), it doesn't print a page 2. How do I force page 2 to also print? (by the way, I'm

Join the discussion →

how to create an asp button dynamically and add event to it

I'm trying to create a button dynamically on asp.net,but I can't add the event to it.What is wrong or missing below? Thanks in advance $ Button btn2 = new Button(); btn2.ID = "btnEdit"; btn2.Text = "Edit Member"; btn2.Click += new EventHandler(btnEdit_Click); form1.Controls.Add(btn2); I also tried like this: $ Button btn2 = new Button(); btn2.ID = "btnEdit"; btn2.Text = "Edit Member"; btn2.Attributes.Add("OnClick","btnEdit_Click); form1.Controls.Add(btn2);

Join the discussion →

Consistency: Dividing an integer by the powers of 2 vs powers of 10?

This is a question concerning cross-platform consistency and determinism of floating point operations (IE yield different results on different CPUs/sysetms) Which one is more likely to stay cross-platform consistent(pseudo code): float myFloat = float ( myInteger) / float( 1024 ) or float myFloat = float ( myInteger ) / float( 1000 ) Platforms are C# and AS3. . AS3 versions: var myFloat:Number = myInteger / 1000 // AS3 var myFloat:Number = myInteger / 1024 // AS3 - Ok I've added AS3 version for clarification, which is equivalent to the 'C pseudo code' above . As you can see in AS3 all calculat

Join the discussion →

Connection timeout with HttpURLConnection in Groovy

I am always getting the "Error Connecting to ${url}" message? Can anyone please show me my mistake? def url = new URL("https://www.google.com") HttpURLConnection connection = (HttpURLConnection) url.openConnection() connection.setRequestMethod("GET") // connection.setConnectTimeout(10000) connection.connect() if (connection.responseCode == 200 || connection.responseCode == 201) { def returnMessage = connection.content //print out the full response println returnMessage } else { println "Error Connecting to " + url } | Error 2012-07-05 00:04:05,950 [http-bio-8080-exec-6] ERROR errors.GrailsExce

Join the discussion →

How to make a table row unclickable in jquery datatable?

Am using jQuery Datatables for listing of the users, and using the selectable property to select and unselect rows. Now I have a issue that I want to make one row non clickable (i.e. the row of logged in user)... how can I do that ..Any help will be appreciated $('#example tr').click( function() { } How can I disable this function for a particular row?

Join the discussion →

Wordpress Pagination for single.php

I've implemented category-based numeric pagination in my Wordpress theme: What I've done so far is create a custom page template with a list of paginated excerpts. Once a user clicks on an excerpt to view the full article I'd also like to paginate the list of returned articles displayed. It's my understanding that this is achieved in the theme's 'single.php', though I may be wrong. The pagination works for my custom template, but when I try implementing the custom query within single.php I think the pagination attempts to find the next page within the article itself, which is not what I'm tryi

Join the discussion →

Always block does not synthesize

I just want to use some if/else statement in Verilog. So I have to use always block. integer count, index; reg a = 0; always @(a) begin a = 1; for (count=0; count<7; count=count+1) begin index = 4*count; if ((significand[index]==1'b0) &&(significand[index+1]==1'b0) && (significand[ind‌​ex+2]==1'b0) && (significand[index+3]==1'b0)) lzero=lzero+1; end end This code does make some sense now. I was able to get the correct simulation result, but I failed to get the correct synthesis on the board.

Join the discussion →

MySQL connections from PHP on IIS?

I have inherited a web site that is in PHP and we are mostly a Windows shop. I cannot get the PHP code to connect to MySQL at all. 1 - The IDE is Eclipse. I imported the project and set up a debug configuration and everything works fine there with HTML and other PHP (non DB) code. 2 - I am running IIS 7.5 with PHP enabled 3 - I have tried to connect to two completely separate MySQL instances (different hosts, different DBs, etc) and it will not connect I have already made sure that sql.safemode is turned to OFF and there is no default server in php.ini (that shouldn't come into play if safe mo

Join the discussion →

hibernate not-null property references a null or transient value:

This problem appears randomly. Program has worked well for over a month and today it crashed. While adding a new order the user can choose a company from the dropdown list. Then he can save new order to the database. It works most of the times even now when a reloaded the app. The error code is as follows: javax.persistence.PersistenceException: org.hibernate.PropertyValueException: not-null property references a null or transient value: mapped.Order.company (odwzorowania.Zlecenie.firma) Using Hibernate, JSF 2.1, MySql 5.5, javax.persistence.* here is the code (names are translated from polish

Join the discussion →
Older stories