Hello Daniweb Community, I was wondering if anyone could help or point me to a good tutorial on how to use Google Authenticator in PHP.

Member Avatar
Member Avatar
+0 forum 6

I've made a rectangle with another 3D point inside. The rectangle is textured with an image. Now, I need to move the point that is inside the rectangle to another 3D position. Does anyone knows how this is possible? The only way I found, that is no good for what I need to achieve was to create another function similar to the one I post here, clear the viewport and redefine the point. This doesn't work in my case because I want the texture to follow the point that was already defined when the texture was set, meaning that the …

Member Avatar
+0 forum 0

The expected outcome dosent agree with result. Following is the code snippet. int a,c; a=10; c=0; c=(--a)+(--a); printf("C: %d", c); printf("\nValue of a: %d", a); I expected C to be 17 i.e (9+8), but it comes out to be 16. And a becomes 8 as expected. When expression is changed to like this. c=(--a); c=c+(--a); Then it works fine. Someone please point out where is loophole in my knowledge. Thanx.

Member Avatar
Member Avatar
+0 forum 6

Hi, i'm trying to use an `AffineTransform` to transform a point to pixels on a 400x400 canvas. What kind of transform would you use? For example: given the points (-1, 1) --transform--> (0, 0) (pixels) (1, 1) --transform--> (400, 0) (pixels) (-1, -1) --transform--> (0, 400) (pixels) (1, -1) --transform--> (400, 400) (pixels) What part of affine transform would I use? translation? scaling? shearing? The code i'm using to draw the points is as follows: //paint method AffineTransform at = new AffineTransform(); //at.translate(... ?? //at.scale(... ?? //at.shear(... ?? Graphics2D g2d = (Graphics2D)g; g2d.setTransform(at); //fill small point g2d.fillRect(20, 50, 3, 3); …

Member Avatar
Member Avatar
+0 forum 2

The following piece of code outputs 0.1000000000001 float a=0.1; printf("%lf",a); But if I add a 10 times as long float b=0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1; printf("lf",b); It outputs as 0.999999999999989 But if a=0.1 is stored as 0.1000000000001 then the answer should be greater than 10 due to the 1 in last column.Then why is the output less then 10

Member Avatar
Member Avatar
+0 forum 3

Hi! I have a Edimax 7612UAn V2 USB Adapter and I don't now how to use it as an acces point. I'm using Linux Mint. By default it doesn't work as a acces point. Is there any way to put it in Master mode? I want to create a wireless network in my home.

Member Avatar
Member Avatar
+0 forum 1

Pros: HARDCORE COVERAGE! Easy installation Lots of options dual band USB sharing 4 guest networks per band fast nice setup menus that look good and easy to navigate lots of security support connections are solid Cons: only thing is lack of print server, other than that it's perfect. Other Thoughts: This AMPED WIRELESS! access point has hardcore coverage!! I can stream a youtube vid from 150 ft away from the AP (outside down the road) with not much effort. That alone makes it worth it. Also this is good for xbox live gaming as well... worked just as good as …

Member Avatar
Member Avatar
+0 forum 1

I wrote a short program to factor numbers, and it works in most cases. The problem I am getting is that when I use a very large number I get "Floating point exception: 8." I am assuming that I am trying to divide by 0 on line 43 or 46, but I cannot quite figure out when/why it would do this. primes.txt is a file with the prime numbers between 2-1,000,000 with one number to a line. primes.txt: https://www.dropbox.com/sh/e3u6prd0pqrhet0/4M4yXYyJIF/primes.txt // // main.cpp // Factor // // Created by Samuel Witt on 11/8/12. // Copyright (c) 2012 Samuel Witt. All rights …

Member Avatar
Member Avatar
+0 forum 4

I have a wireless access point. I can connect to it just fine. I can go to Google and I can type in a search, however I cannot GO to the searches result links at all. I've tried IE and Firefox and both the same. I can search for something and it will show me the results, however when I click on ANY of the links, it will not go to any of them. It just sits there forever. No error, nothing. It WILL got to a site I "find" if I type the entire address into the URL, BUT...if …

Member Avatar
Member Avatar
+0 forum 2

#include<stdio.h> #include<conio.h> void main() { float a[5][5],x[3];float t,s; int i,j,k; printf("enter a matrix of order 3*4"); for(i=0;i<3;i++) { for(j=0;j<4;j++) { scanf("%f",&a[i][j]); } } for(i=0;i<3;i++) { for(j=0;j<4;j++) printf("%f ",a[i][j]); printf("\n"); } for(i=0;i<=1;i++) { for(j=i+1;j<=2;j++) { t=a[j][i]/a[i][i]; for(k=i;k<=3;k++) a[j][k]=a[j][k]-t*a[i][k]; } } printf("The upper triangular matrix is as\n"); for(i=0;i<3;i++) { for(j=0;j<4;j++) printf(" %f",a[i][j]); printf("\n"); } for(i=2;i>=0;i--) { s=0.0; for(j=i+1;j<3;j++) { s=s+a[i][j]*x[j]; x[i]=(a[i][3]-s)/a[i][i]; } } printf("\nRoots of the equation are"); for(i=0;i<=2;i++) printf(" %f",x[i]); getch(); }

Member Avatar
Member Avatar
+0 forum 7

Hello, I am very new to C and having the hardest time with arrays. I am attempting to find a pivot point in a sorted array for example { 1 2 4 5 9 } might become { 5 9 1 2 4 }. I am thinking it should be something to the degree of start at array[size] and if it is larger than array[size-1] continue if not array[size] is the pivot point. I could be completely off in that assumption but regardless I am having problems coding it either way. Could anyone shed some light on this for me …

Member Avatar
Member Avatar
+0 forum 3

I own a small computer business and have for almost 10 years now. We have used just a basic POS system and i am looking to replace it with something more oriented towards my type of business. Specifically something that in addition to taking care of my POS needs, be able to track work orders/tickets, track work done to specific customer computers, RMAs, quotes/projects/builds etc etc. I've been looking for something to fill this need for some time but nothing seems to do all of what i need - how can this be with all the computer service shops out …

Member Avatar
+0 forum 0

how to find the radius using the center point only... the only given point is the center point... how to get or calculate for the radius...

Member Avatar
Member Avatar
+0 forum 2

Hello all, I'm having trouble getting google to give me anything useful because I don't know the name of the algorithm I'm looking for. ![line_types](/attachments/large/1/line_types.png "line_types") This image shows different ways of connecting two points together, A is just plain lines, C is bezier curves but what is the algorithm that is usually used for B? the double 90 degree bent line, I've googled various different phrases with no luck, most give me smooth curves like C. any information onf the name of the algorithm usually used for B would be helpful, or links would be good too. NOTE: D …

Member Avatar
Member Avatar
+0 forum 1

Hi Frendz, I have a set of polygon points on google map. I need to find whether the given input point is lying inside of the polygon or not? If anybody found articles related this please guide me. And also i need the same with poly line.

Member Avatar
Member Avatar
+0 forum 8

Hi! I have a decimal number (e.g 6433) and would like to see the process of converting this to IEEE short real floating point format! Any help is appreciated ;)

Member Avatar
Member Avatar
+0 forum 1

I started writing this code as practice for my Computer Science class. The goal was to help with structs and arrays. But I have come to a problem. The file will compile, but returns a message saying "floating point exception." Doing research I see there could a few reasons, but I can't stop any problems with my code. I was hoping if I had someone more experienced look at the code, maybe I can get help understanding what I did. BEWARE: I am just a beginner with C++. This may or may not hurt your eyes. Just some info on …

Member Avatar
Member Avatar
+0 forum 1

Heya guys, basically here is some code for a simple example program: [CODE] unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls; type TForm1 = class(TForm) img1: TImage; procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject); var Image : TBitmap; begin Image := TBitmap.create; Image.Width := 800; Image.Height := 600; img1.Picture.Graphic := Image; With img1.Picture.Bitmap.Canvas do begin Pen.Color := clRed; Pen.Width := 5; MoveTo(100,100); LineTo(100,120); MoveTo(95,120); LineTo(105,120); MoveTo(100,110); LineTo(110,113); MoveTo(100,110); LineTo(90,113); end; end; end. [/CODE] It's basically a program which …

Member Avatar
Member Avatar
+0 forum 8

Hello All ! I'm trying to write a Robot Class who have several methods. One of its methods is move() that move the robot the direction his looking at, one step ahead. I'm getting an error on this: [CODE]switch (Direction) {[/CODE] If some one can help me find the mistake, and help me improved my code, I will be more than happy !! My code: [CODE]import java.awt.*; public class Robot { private int roboId; private Point location; public static enum Direction {UP,DOWN,RIGHT,LEFT} private Direction dir; // creates an object for the constructor public static final int DX=1; public static final …

Member Avatar
Member Avatar
+0 forum 6

Hello again! I'm having trouble trying to double the value of my coordinates in my point. The object is to create a pair of eyes and their position is identified by clicking a point in the graphic window which would allocated the centre of the left eye, and the second click would identify the radius of the circle by clicking the edge of its circumference. The third eye is placed directly beside it, so I figured I had to make the coordinates of the right eye's centre twice as long as the left eye's centre. I've tried so many arithmetic …

Member Avatar
Member Avatar
+0 forum 1

Hi everybody, I have been having trouble with the output of a set of points for my triangle program. When I run my program, it outputs in the end "triangle1 coordinates: Vertex A is java.awt.Point[x=12,y=13]" and I have no idea how to format it to hide the "[B]java.awt.Point[/B]" part. Any advice would be greatly appreciated! Thanks in advance. [CODE]public class TriangleTester { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("Enter the x- and y- coordinates of the first vertex: "); int a1 = scan.nextInt(); int a2 = scan.nextInt(); System.out.println("Enter the x- and y- coordinates of the …

Member Avatar
Member Avatar
+0 forum 2

Problem: solve the following Source of SHORTEST DISTANCE path of A,B,C,D,E,F,G. I already did link the strings of dots of ABCDEFG and made a polygon which is the other objectives, my only problem now is calculating the source of the shortest distance part of A,B,C,D,E,F,G. Am using net beans. Guys can you please help me? am very much confused. /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author User */ public class paths{ } import java.awt.Color; import java.awt.Graphics; import java.swing.*; public class paths { private static …

Member Avatar
Member Avatar
+0 forum 7

Hi Frendz, How to check whether the given point(latitude,longitude) is in polyline or not using php? I have set of latitude and longitude points of polyline in my database.

Member Avatar
Member Avatar
+0 forum 3

How to add control for marking area using points,lines and polygons on google map and how to store that area in mysql db? Becoz i need to give alert message when my vehicle cross that area in my vehicle tracking system.

Member Avatar
Member Avatar
+0 forum 1

working on a 32bit architecture and i'm adding two arrays together slot by slot into a third array so if I have 3,4,4 and 4,4,4 in the arrays the third array should contain 7,8,8 at the end of the function I was able to pass in the arrays correctly and the amount of items into the function arleady, i know this because I ran test code now i'm working on the addition part of it, here is what I have, the logic makes sense to me but it's still seg faulting...ideas? [CODE];*************************************ADD ARRAY********************************************** segment .bss ; segment .data summessage db …

Member Avatar
+0 forum 0

Hi.. how to calculate distance between two points.. each point have a coordinates (x,y). please help..

Member Avatar
Member Avatar
+2 forum 1

I have left my source of information as docstring comment on code side. If you want to solve the problem yourself do not run the code. This code actually gives the correct answer. I have not reacted to the border case comment in my formula source as it is quite common to consider on border part of inside. You can add the simple check with optional parameter for how to react to case, for example, if you need it. As everybody have read carefully Python documentation, the source of Point object by namedtuple should be clear. It is worth to …

Member Avatar
+0 forum 0

I am receiving my secure WiFi from a distance and would like to set up an access point to strengthen the signal at the receiving point. My current setup is a D-Link Randbooster wireless N Router with WAP security. My Belkin wireless N router has the ability to be set up as an access point, but the instructions are not written in baby talk so that I can configure the access point with the correct IP and such. Is there a website or something I can use to walk me through this? Thanks Raymond

Member Avatar
+0 forum 0

I am trying to save a form location to a database whenever the LocationChanged event is triggered on that form. [code] private void DisplayForm_LocationChanged(object sender, EventArgs e) { DSLocation = this.Location; ((Form1)this.MdiParent).NotifyChanges(this); // notify parent form that there are changes on this child } childForm.Location = StringToPoint((string)row["location"]); [/code] DSLocation is a property that I'm trying to fill with data from this.Location in order to pass it back to the parent form and ultimately the database. Whenever I try to compile, I get the error: Cannot implicitly convert type 'System.Drawing.Point' to 'string' I know that I need to somehow break the …

Member Avatar
Member Avatar
+0 forum 2

Dear all, I would like to buy one or two (if needed) wifi access point for my lab. The lab hall is about 50 meters long and there is a concrete wall in the middle. This is mainly to give an internet connexion (so no huge file transfer). Would it be possible to advice me some good device (sold in Europe) not too expensive (my budget is about 300-400€). I thank you a lot for your help, Cheers, Sylvain

Member Avatar
Member Avatar
+0 forum 2

The End.