32,199 Topics

Member Avatar for
Member Avatar for kasis
Member Avatar for vivekH

how to export my table data which is in mysql database to a csv file I am not getting any error or exception but my csv file is empty after successful running this code. code what i did: import java.io.FileWriter; import java.sql.Connection; import java.sql.DriverManager; import java.sql.Statement; import java.sql.ResultSet; import java.sql.SQLException; …

Member Avatar for aditya_20
0
12K
Member Avatar for Saif_7
Member Avatar for newbee_jv

Hello everyone, I am new to Regular expression, and would like some hints, please if someone can direct me to right place. I have a bunch of files in a directory, and i need to rename them based on certain pattern. I think I need to use regular expression to …

Member Avatar for newbee_jv
0
262
Member Avatar for Carsten_1

I've been trying to have a button (Arduino) change the fill color of an ellipse in Processing 3. I thought an if statement like `if(button == 0){ if(fillValue == rgb){ fill(0,0,0);}`or something more or less. So if some one has the awnser please help.

Member Avatar for diafol
0
254
Member Avatar for Saboor_1

Hello to all! I have an order of a simple desktop pos which i will develop in java. Actually i have to develop this pos for a person who is owner of a hardware shop(nuts,bolts,nails, hammers and screw drivers etc.). He needs features as follows: 1-Automate his sales transaction i-e …

Member Avatar for rproffitt
0
255
Member Avatar for Adm666

So i've made a Node class : public class IntNode { private int _value; private IntNode _next; public IntNode(int v, IntNode n) { _value = v; _next = n; } public int getValue() { return _value; } public IntNode getNext() { return _next; } public void setValue(int v) { _value …

Member Avatar for JamesCherrill
0
924
Member Avatar for Monique_2

Modify the Week Two Java non-GUI console application using NetBeans IDE (or jGrasp) to meet these additional and changed business requirements: • The company has recently changed its total annual compensation policy to improve sales. • A salesperson will continue to earn a fixed salary of $35,000.00. The current sales …

Member Avatar for JamesCherrill
0
560
Member Avatar for akrati

please , tell me how i should start making a simple search engine.......what are the things i will need to learn.And how should i proceed?

Member Avatar for Dani
0
306
Member Avatar for shivali_1

Hi , I want to display a calendar in frontend and then I want to retreive the date selected by user in another java file within same project. Please help how can i acheive this Regards, Shivali

Member Avatar for JamesCherrill
0
105
Member Avatar for SimonIoa

Hello. In my editor shows that there is a syxtax error in this function. Does anyone knows whats the syntax error? !function(i,t){var e=function(i,t,e){var s;return function(){function n(){e||i.apply(o,r),s=null}var o=this,r=arguments;s?clearTimeout(s):e&&i.apply(o,r),s=setTimeout(n,t||150)}};jQuery.fn[t]=function(i){return i?this.bind("resize",e(i)):this.trigger(t)}}(jQuery,"smartresize"),function(i){i.Gal=function(t,e){this.element=i(e),this._init(t)},i.Gal.settings={selector:".item",width:225,gutter:20,animate:!1,animationOptions:{speed:200,duration:300,effect:"fadeInOnAppear",queue:!0,complete:function(){}}},i.Gal.prototype={_init:function(t){var e=this;this.name=this._setName(5),this.gridArr=[],this.gridArrAppend=[],this.gridArrPrepend=[],this.setArr=!1,this.setGrid=!1,this.setOptions,this.cols=0,this.itemCount=0,this.prependCount=0,this.isPrepending=!1,this.appendCount=0,this.resetCount=!0,this.ifCallback=!0,this.box=this.element,this.options=i.extend(!0,{},i.Gal.settings,t),this.gridArr=i.makeArray(this.box.find(this.options.selector)),this.isResizing=!1,this.w=0,this.boxArr=[],this._setCols(),this._renderGrid("append"),i(this.box).addClass("gridalicious"),i(window).smartresize(function(){e.resize()})},_setName:function(i,t){return t=t?t:"",i?this._setName(--i,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".charAt(Math.floor(60*Math.random()))+t):t},_setCols:function(){this.cols=Math.floor(this.box.width()/this.options.width),this.cols<1&&(this.cols=1),diff=(this.box.width()-this.cols*this.options.width-this.options.gutter)/this.cols,w=(this.options.width+diff)/this.box.width()*100,this.w=w;for(var t=0;t<this.cols;t++){var e=i("<div></div>").addClass("galcolumn").attr("id","item"+t+this.name).css({width:w+"%",paddingLeft:this.options.gutter,paddingBottom:this.options.gutter,"float":"left","-webkit-box-sizing":"border-box","-moz-box-sizing":"border-box","-o-box-sizing":"border-box","box-sizing":"border-box"});this.box.append(e)}this.box.find(i("#clear"+this.name)).remove();var s=i("<div></div>").css({clear:"both",height:"0",width:"0",display:"block"}).attr("id","clear"+this.name);this.box.append(s)},_renderGrid:function(t,e,s,n){var o=[],r=[],a=0,h=(this.prependCount,this.appendCount),d=this.options.gutter,p=this.cols,c=this.name;i(".galcolumn").width();e?(r=e,"append"==t&&(h+=s,a=this.appendCount),"prepend"==t&&(this.isPrepending=!0,a=Math.round(s%p),0>=a&&(a=p)),"renderAfterPrepend"==t&&(h+=s,a=s)):(r=this.gridArr,h=i(this.gridArr).size()),i.each(r,function(e,s){var n=i(s),r="100%";n.hasClass("not-responsive")&&(r="auto"),n.css({marginBottom:d,zoom:"1",filter:"alpha(opacity=0)",opacity:"0"}).find("img, object, embed, iframe").css({width:r,height:"auto",display:"block","margin-left":"auto","margin-right":"auto"}),"prepend"==t?(a--,i("#item"+a+c).prepend(n),o.push(n),0==a&&(a=p)):(i("#item"+a+c).append(n),o.push(n),a++,a>=p&&(a=0),h>=p&&(h-=p))}),this.appendCount=h,this.itemCount=a,"append"==t||"prepend"==t?("prepend"==t&&this._updateAfterPrepend(this.gridArr,r),this._renderItem(o),this.isPrepending=!1):this._renderItem(this.gridArr)},_collectItems:function(){var t=[];return i(this.box).find(this.options.selector).each(function(e){t.push(i(this))}),t},_renderItem:function(t){var e=this.options.animationOptions.speed,s=this.options.animationOptions.effect,n=this.options.animationOptions.duration,o=this.options.animationOptions.queue,r=this.options.animate,a=this.options.animationOptions.complete,h=0,d=0;r!==!0||this.isResizing?(i.each(t,function(t,e){i(e).css({opacity:"1",filter:"alpha(opacity=1)"})}),this.ifCallback&&a.call(t)):(o===!0&&"fadeInOnAppear"==s?(this.isPrepending&&t.reverse(),i.each(t,function(s,o){setTimeout(function(){i(o).animate({opacity:"1.0"},n),d++,d==t.length&&a.call(void 0,t)},h*e),h++})):o===!1&&"fadeInOnAppear"==s&&(this.isPrepending&&t.reverse(),i.each(t,function(e,s){i(s).animate({opacity:"1.0"},n),d++,d==t.length&&this.ifCallback&&a.call(void 0,t)})),o!==!0||s||i.each(t,function(e,s){i(s).css({opacity:"1",filter:"alpha(opacity=1)"}),d++,d==t.length&&this.ifCallback&&a.call(void 0,t)}))},_updateAfterPrepend:function(t,e){var s=this.gridArr;i.each(e,function(i,t){s.unshift(t)}),this.gridArr=s},resize:function(){this.box.find(i(".galcolumn")).remove(),this._setCols(),this.ifCallback=!1,this.isResizing=!0,this._renderGrid("append"),this.ifCallback=!0,this.isResizing=!1},append:function(t){var e=this.gridArr,s=this.gridArrPrepend;i.each(t,function(i,t){e.push(t),s.push(t)}),this._renderGrid("append",t,i(t).size())},prepend:function(t){this.ifCallback=!1,this._renderGrid("prepend",t,i(t).size()),this.ifCallback=!0}},i.fn.gridalicious=function(t,e){return"string"==typeof t?this.each(function(){var s=i.data(this,"gridalicious");s[t].apply(s,[e])}):this.each(function(){i.data(this,"gridalicious",new i.Gal(t,this))}),this}}(jQuery);

Member Avatar for SimonIoa
-1
413
Member Avatar for Adm666

is there anyway to improve my code's time complexity or memory's complexity ? (without using advanced methods - im a beginner) its a method that gets an array filled with zeroes and other numbers, and it changes each number(which is not a zero) to the distance of the closest zero …

Member Avatar for JamesCherrill
0
388
Member Avatar for Adm666

i tend to make a method which compares between 2 strings, str1 and str2 and should return true in the terms: -every character in str1 must show up in str 2 at least once or more and in the same order -str2 must be the same length or longer than …

Member Avatar for Adm666
0
4K
Member Avatar for Monique_2

I wrote the program up, but I'm getting all types of errors. Which I'm new to this whole Java Application class. I keep getting errors : Please help. 1. employee is not defined. 2. NewSalesPerson is not defined. 3. UtilnumFormat is not defined. 4. Variable declaration not allowed here. 5. …

Member Avatar for JamesCherrill
0
655
Member Avatar for Monique_2

Part 2 to Salesperson Java Application, still new to this. class SalesPerson { /** * Fixed Salary */ final double fixedSalary = 35000; /** * Current Commission Rate */ public double curCommissionRate = 0.15; /** * Accrued Commission */ public double curCommission = 0; /** * Total Compensation */ public …

0
222
Member Avatar for Adm666

Just as the title says im trying to get the sum of a string's characters values, but in a recursive way and without for loops i tried to do this, but it says that a return type required? private stringSum(String s, int i) { if (i==a.length) return 0; return ((int)s.charAt(i)+ …

Member Avatar for Dani
1
163
Member Avatar for NhejdLoise

Moderator edit> Original text deleted Original post was just a copy of a homework brief. No effort shown, not even a question. Will everybody PLEASE read this advice before posting https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question

Member Avatar for JamesCherrill
0
308
Member Avatar for Belén_2

Hi, I am creating a program that when you print an author, you must show all the information of all the books that the author has written. Add a new attribute in the Author class that will be "BooksWriting: List (Book)". I have expanded the program so that it also …

Member Avatar for JamesCherrill
0
288
Member Avatar for divinity02

hi everybody I am currently creating a simulation of a pizza ordering system in object oriented program. I have some question. the instruction and guideline is long but I will try and cut it down a lot. the instruction is to create a program that simulate a pizza restaurant using …

Member Avatar for divinity02
0
2K
Member Avatar for scheppy

Good Day Lets say i have a array of integers.... -always differs in length I need to know all the possibilities the numbers in the string have to add up to a certain number. let say 5; and my array contains 1,3,4,3,5,8,2,1; than the possibilites would be.... (3,2)(4,1)(3,1,1) But i …

Member Avatar for JamesCherrill
0
253
Member Avatar for ICHI_2
Member Avatar for dhivya_1
Member Avatar for JamesCherrill
0
69
Member Avatar for Mark_61

Hey guys! Working on a project that I am stuck on at the moment! Any help would be really appreciated! I need to get my JLabel to display a count of the three differnet shapes my RandomShapesGenerator program. I know I need to use a String.format but just dont know …

Member Avatar for JamesCherrill
0
328
Member Avatar for Anu_6

public static void sentencesChecker(String essay) { int count = 0; int countcap = 0; int i , j; for ( i = 0; i < essay.length(); i++) { if (essay.charAt(i) == '.') { count++; } for ( char e= 'A'; e<='Z';e++) { if (essay.charAt(i)==e){ countcap++; } } } System.out.print("\n\t\t" + …

Member Avatar for anand01
0
280
Member Avatar for Luke_4

Trying to get just the search results (inside and outside the search box). Everything else on the page, which is NOT involved with the search box and its results, should not print. Tried many types of @media and css but can't seem to find the answer. I may be doing …

Member Avatar for Luke_4
0
495
Member Avatar for Vegito1991

I was doing my login access with ms access database (accdb), supposed can work but after i upgrade to java 8, it no longer able to support odbc and i was struggled to solve this problem, and it gave me the ClassNotFoundException list of library i have in my netbean …

Member Avatar for Arun_18
0
6K
Member Avatar for esra_2
Member Avatar for rubberman
0
155
Member Avatar for jengels

I am writing a java program. One of the functions of my program is to count all the uppercase letters in a paragraph of text I import. I am not sure how to set this up. Is it something like, isUpperCase.(char) Any help would be great Thanks

Member Avatar for JamesCherrill
0
4K
Member Avatar for Dejan_3

Hey guys,I have a problem solving the 7.2 exercise in the book Think Java v6.1.0. Any help please?

Member Avatar for sunnyy_1
0
307
Member Avatar for zike_1

hi everyone can anyone help me this project ? ******************************************** The existing system, normally in a company, employees enter the office at different times. To administer the timings of the employees, we write the entry time and exit time of the employees in a register, which had some problems such …

Member Avatar for jwenting
0
203

The End.