46 Solved Topics

Remove Filter
Member Avatar for riahc3

Simple timediff: SELECT time_format(timediff('2014-04-24 09:11:37','2014-04-24 09:09:37'),'%H:%m:%s') as dif Returns 00:00:00 . Im problably missing something stupid, my apoligies...

Member Avatar for riahc3
0
190
Member Avatar for riahc3

I have in a MySQL database with the column type being DateTime the following time: Timestamp: 9:34:09 9:34:23 9:34:45 9:34:50 9:35:09 9:36:17 But a DataGridView in C# only shows me 9:34 9:34 9:34 9:34 9:35 9:36 Why?

Member Avatar for riahc3
0
1K
Member Avatar for riahc3

I have this table: Time_Stamp Time_Stamp_ms '2014-04-11 13:33:24', '879', '5555', '4444', '3333', '2222', '1111', '123', '1', 'text' '2014-04-11 13:33:24', '899', '5555', '4444', '3333', '2222', '1111', '123', '2', 'text' '2014-04-11 13:33:24', '919', '5555', '4444', '3333', '2222', '1111', '123', '3', 'text' '2014-04-11 13:33:24', '939', '5555', '4444', '3333', '2222', '1111', '123', '4', 'text' …

Member Avatar for riahc3
0
221
Member Avatar for riahc3

I have a table (employees) like this ID Name Group Email 1 Bob Buckland Marketing b@example.com 2 George Alaz Engineering g@example.com 3 Tom Grady Marketing t@example.com 4 Mary Jane Engineering m@example.com Im going to use this in a email form. First a combobox should load all the groups possible. This …

Member Avatar for riahc3
0
152
Member Avatar for riahc3

Hello This is one of those stupid questions but you gotta ask to be sure What is var h=0; h += 5; var l=0; l -= 5; Is it the same as: var h=0; h = h+ 5; var l=0; l = l- 5; Thanks and sorry for the stupidity

Member Avatar for deceptikon
0
237
Member Avatar for riahc3

Hello Since I can't get something to work, as a temp fix, Im going to do something else but I need this to only happen if it is a Webkit based browser (Safari, Chrome, Android, etc...). How can I detect this? Thank you

Member Avatar for riahc3
0
255
Member Avatar for riahc3

Hello I have this: String price="10,00 €"; int num=2; int sum=Integer.valueOf(price)*num; System.out.println(sum); //Should print out AT LEAST 20,00 But note: That € sign can be $, €, £ or another AND it can come before or after the numeric float amount. What is the best way to do this? Thank …

Member Avatar for mKorbel
0
554
Member Avatar for riahc3

Hello Im having problems removing the ALT+0160 character from a string. iswhitespace doesnt seem to work. How can I manually remove it?

Member Avatar for M4trixSh4d0w
0
94
Member Avatar for riahc3

Hello I know threads are problably better just left (even if solved/closed) but I think it would be nice to be able to delete our own threads. If we post a custom algorthim (for example, this is a exageration) to the meaning of life, we wouldnt like other people to …

Member Avatar for Dani
0
139
Member Avatar for riahc3

What exactly is "OP Kudos"? I thought it was when you vote up the OP of a thread but that doesnt seem to be the case...

Member Avatar for riahc3
0
157
Member Avatar for riahc3

Hello Im currently creating BMPs as a bufferedimage as following: BufferedImage bufferedImage = new BufferedImage(320, 320, BufferedImage.TYPE_INT_RGB); Thing is that black and white is more than enough for me so would I do this: BufferedImage bufferedImage = new BufferedImage(320, 320, BufferedImage.TYPE_BYTE_BINARY); ? Thanks

Member Avatar for riahc3
0
86
Member Avatar for riahc3

Im trying to set a session variable using AJAX but it doesnt seem to work: This is my PHTML page: <?php session_start(); ?> //SOME CODE <script type="text/javascript"> $j(document).ready(function() { var variablecalle=$j("#listadetiendas").val(); var data = 'calle='+variablecalle; $j.ajax({ url: '../../updatesession.php', type: 'POST', data: data }) }); Then this is my "updatesession.php" page: …

Member Avatar for riahc3
0
12K
Member Avatar for riahc3

Hello I wish to convert the following jQuery each to fors....This way I can see it a lot clearer.... var draws = this.canvasListener.getDrawManager().getAll(); $j.each(draws, function(index, draw) { var points = draw.getPointManager().getAll(); $j.each(points, function(index, point) { }.bind(this)); } Yes, I know "each" is faster and better optimize but I dont care. …

Member Avatar for riahc3
0
145
Member Avatar for riahc3

Ive created a dropdown box dynamically getting datea from a database but when I try to get (or set) the first value, it always says undefined. Ive tried something like: $j("#mydiv").val(1); var somevariable = $j("#mydiv").val(); console.log ("print it out " + somevariable); And it says print it out undefined If …

Member Avatar for riahc3
0
171
Member Avatar for riahc3

Man that was a mouthful! Basically I have a page which when I click on a button, a jQuery (iframe) window comes up. Here there is a combobox that should be filled with values I read from a database. Ive been reading two pages: http://openenergymonitor.org/emon/node/107 http://stackoverflow.com/questions/8019489/simple-ajax-jquery-script-how-can-i-get-information-for-each-of-the-rows-in-the But Im having problems …

Member Avatar for riahc3
0
954
Member Avatar for riahc3

I habe table one with Col 1 (PK) Col 2 (NN) Col 3 (NN) Col 4 (NN) Col 5 (NN) Col 6 Col 7 Col 8 Then I create table two with Col 1 (PK) (AI) Col 2 Col 3 (FK) That col 3 from table two is col 1 …

Member Avatar for pritaeas
0
123
Member Avatar for riahc3

Hello I want to remove this: > As you see it is a blank but the regular variable.replace(/\s+/g,''); does not work. I generate this character with Alt+0160 The best way would be its ascii code so how do I do it?

Member Avatar for riahc3
0
235
Member Avatar for riahc3

Hello First off the server is running Windows 7 32bits. I have the following code: <?php $fp = fopen(getcwd()."/test.txt", "w"); fwrite($fp, "hello"); chmod(getcwd()."/test.txt", 0777); unlink(getcwd()."/test.txt"); fclose($fp); ?> It creates the file perfectly but afterwards I cannot delete it. Giving me this error: Warning: unlink(C:\test.txt) [function.unlink]: Permission denied in C:\writeanddel.php on …

Member Avatar for Ezzaral
0
1K
Member Avatar for riahc3

Hello I want to do a indexOf but of certain special characters such as variable.indexOf(''')==-1) variable.indexOf('/')==-1) variable.indexOf('')==-1) variable.indexOf('"')==-1) etc, etc. How can I do this?

Member Avatar for pritaeas
0
74
Member Avatar for riahc3

Hello Im trying to do some basic FTP work. What I am trying to do is: 1: Search for a folder named "hi" in "C:". If hi exists, enter it. If it doesnt, create it THEN enter it. 2: Inside hi, count FILES and see if there is greater or …

Member Avatar for Taywin
0
485
Member Avatar for riahc3

Hello I have the following: String somestring="203/9834/345"; somestring.replace("/",""); System.out.println(somestring); But it does not remove the slashes. How can I remove them? Thanks

Member Avatar for riahc3
0
143
Member Avatar for riahc3

Hey I want to do something like this: <script language="javascript"> function calculatesha() { var name = document.getElementById("firstname").value; var last = document.getElementById("lastname").value; var complete = name+last; var hash = <?php echo(sha1(?>complete<?php));?>; } </script> I hope the code is understood even if it is wrong. Thanks.

Member Avatar for riahc3
0
311
Member Avatar for riahc3

Hey I have this code........ /*MORE THINGS ABOVE*/ <?php foreach ($_options as $_option) : ?> <?php print_r($_option);?> /*MORE THINGS BELOW*/ That print_r gives me this (the first time around, other times its the same but it just gives me different Xs and Ys which is expected): Array ( [label] => …

Member Avatar for riahc3
0
179
Member Avatar for riahc3

Hey When I try to interpret thru PHP, a Java web service that returns a boolean type, this error (more like a warning) pops up: Notice: Object of class stdClass could not be converted to int in C:\testing\page.php on line 29 It seems this is something PHP related. How can …

Member Avatar for riahc3
0
726
Member Avatar for riahc3

Hello Im trying to make a internal site (Called test.dev) but I cant get it to be viewed internally. I made a A record on the DNS server point "test.dev" to my IP which would be for example 192.168.1.45 but I try to access it on a client PC and …

Member Avatar for riahc3
0
172
Member Avatar for riahc3

Hey I have the following code private void buttonInicio_Click(object sender, EventArgs e) { MySql.Data.MySqlClient.MySqlConnection conn; String constring = "server=localhost;database=bd;uid=user;password=pass;"; try { conn = new MySql.Data.MySqlClient.MySqlConnection(constring); string query = "COUNT (*) FROM table WHERE usuario=" + Globales.usuario + " AND pass=" + Globales.contra; MySqlCommand cmd = new MySqlCommand(query,conn); cmd.CommandType = CommandType.Text; …

Member Avatar for riahc3
0
5K
Member Avatar for riahc3

Hey Ive been literally killing myself looking up guides but most are way outdated and/or complicated. I tried a few simply ones but they simply appear to be out of date. Can someone point me on a easy way to set it up in Windows? Ive been trying to use …

Member Avatar for riahc3
0
157
Member Avatar for riahc3

Hey I am having problems making a exact copy of a file. It seems that it changes the headers of the file. I tried using the Apache fileutils copyfile method but it seems to change the header completely. The rest of the file looks pretty much OK. I think it …

Member Avatar for riahc3
0
238
Member Avatar for riahc3

Hey I have a FTP server with this [url]ftp://192.168.100.2/folder/[/url] And I have something like anotherfolder: afolderinsidethatone: file1.bin file2.bin file.txt I want to pass all of that to the ftp server so it takes this form: [url]ftp://192.168.100.2/folder/anotherfolder/[/url] [url]ftp://192.168.100.2/folder/anotherfolder/afolderinsidethatone/[/url] [url]ftp://192.168.100.2/folder/anotherfolder/afolderinsidethatone/file1.bin[/url] [url]ftp://192.168.100.2/folder/anotherfolder/afolderinsidethatone/file2.bin[/url] [url]ftp://192.168.100.2/folder/anotherfolder/file.txt[/url] I have this code: [code] public void subidaftp(String ip, String …

Member Avatar for riahc3
0
217
Member Avatar for riahc3

Hey I have this code [code] FileUtils.forceDelete(new File(nombreprograma+".zip"); FileUtils.forceDelete(new File(nombreprograma+"/"+nombrebmp+".bmp")); [/code] Deleting the zip inside of the root works perfect but for some reason the BMP inside of a folder, doesnt. The error it gives is that it cannot delete the file, nothing else. Any tips?

Member Avatar for dantinkakkar
0
282
Member Avatar for riahc3

Hey I want to get the date and time with miliseconds in a format such as: 2012-02-09 12:41:52.982 or 2012-02-09 16:41:52.129 How can I do this in Java? (If I can get a localized version of "Tuesday" as "Tues" as well even better but if not, I dont mind. Something …

Member Avatar for riahc3
0
439
Member Avatar for riahc3

Hey I have a folder in my current working path and I want to make a copy of a file inside it to the the current working path. Its kind of a dumb question, I know, but how do it do it? Thank you.

Member Avatar for riahc3
0
210
Member Avatar for riahc3

Hey I want to control a textbox to only allow numbers, backspace and a certain length. Ive tried with the IsNumeric function but I cant seem to get it to work. Thanks.

Member Avatar for princenathan
0
4K
Member Avatar for riahc3

If I go to [url]http://localhost/somefolder/somepicture.bmp[/url] I cant see if in my navigator. Now If I go to C:/somefolder/somepicture.bmp It works perfectly. This is completely driving me crazy. I really have no other methods that I could try to get this to work. Ask questions and Ill try to give answers..... …

Member Avatar for riahc3
0
102
Member Avatar for riahc3

Hello Using MySQL, I have DB 1 with table T1 on Server 1 and DB 2 with table T1 on Server 2. Not on the same network and T1 contain the same columns with the same datatypes. I want to create a trigger on DB 1 so when there is …

Member Avatar for riahc3
0
3K
Member Avatar for riahc3

(This has to be a Java question as it simply works in a txt with a HTML extension....) I have this code: [code] <html><head><title></title></head><body> <form id='formulario' action='index.html' method='post'> <label>Ancho </label><input type='text' name='ancho' id='ancho'><br > <label>Alto </label><input type='text' name='alto' id='alto'><br > <label>Izquierda </label><input type='text' name='izquierda' id='izquierda'><br > <label>Horizontales </label><input type='text' name='horizontal' …

Member Avatar for riahc3
0
82
Member Avatar for riahc3

Hey Putting this code: [code] System.out.println("Hello"); BufferedImage bufferedImage = new BufferedImage(620, 420, BufferedImage.TYPE_INT_RGB); System.out.println("Bye"); Graphics2D g2d = bufferedImage.createGraphics(); g2d.setColor(Color.black); g2d.fillRect(0, 0, 620,420); g2d.setColor(Color.yellow); [/code] It throws a java.lang.OutOfMemoryError: Java heap space error not displaying the bye. I dont understand as my BufferedImage is nothing at all (simple 620 by 420). …

Member Avatar for riahc3
0
1K
Member Avatar for riahc3

My index.html is: [code] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title></title> </head> <body> <form action="index.php" method="post" name="uandp"> <input type="text" name="user"><br > <input type="password" name="password"> <input type="submit" value="Go"> </form> </body> </html> [/code] My index.php is: [code] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <?php session_start(); ?> …

Member Avatar for riahc3
0
135
Member Avatar for riahc3

Hello The instructions for installing the Android SDK on Eclipse are different than on MyEclipse (following Google). Any step by step? Thank you

Member Avatar for riahc3
0
261
Member Avatar for riahc3

Hey Lets see if I can explain myself correctly...... I have 2 projects, one a program and another a library. First project is basically this, more or less (obviously it is more complicated) [code] //This is the main project //Inside com.stuct: //Global.java package com.stuct; public class Global { public static …

Member Avatar for riahc3
0
529
Member Avatar for riahc3

Hey I want to create a JAR library but not sure how to in MyEclipse. Im currently doing it manually using jar command but I cant seem to get it correctly The library code is: [code] public class LibAdd { public static int addtwonumbers (int a,int b) { return a+b; …

Member Avatar for riahc3
0
179
Member Avatar for riahc3

Hello I'm tring to declare a BinaryOut type of object in a Java web project but it doesn't seem to work. I've imported the same libraries I used in a standard Java project so I don't know what's wrong. Any tips????

Member Avatar for riahc3
0
184
Member Avatar for riahc3

Hello Im trying the ini4j library but I seem to be having problems writing a Unicode file (no problems reading I believe) Is this a Java issue or ini4j? Thank you

Member Avatar for riahc3
0
747
Member Avatar for riahc3

Hey I was wondering how I could write a binary file in Java with code in C++ using the reinterpret_cast function. If I remember the line correctly (not currently at work) it was: [CODE] file.write=reinterpret_cast<char *(&x)>,sizeof x; [/CODE] with x being a variable. How can I do that in Java? …

Member Avatar for riahc3
0
939
Member Avatar for riahc3

Hey Im currently working on a application server written in Java but to use information from a C++ program. The company seems to agree that rewriting thousands of lines of code would be time consuming and simply making libraries of key functions of the C++ program and then passing them …

Member Avatar for riahc3
0
2K
Member Avatar for riahc3

Hello Ive been searching around Google and while I have found some answers, Im not sure how to implant them correctly. I wish to disable the Close (X) button on a Windows Form. I read about ControlBox (I think that the property) but I perfer to do it another way. …

Member Avatar for riahc3
0
117

The End.