Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!

naveen yadav

Ranch Hand
+ Follow
since Oct 23, 2011
naveen likes ...
Java MyEclipse IDE Spring
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
12
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by naveen yadav

how about python. very good language to start programming
4 years ago
I have a UTF-8 string in from which i want to find out which are non-ASCII characters.

lets say i have char arr[] = "x√ab c"; , and it has 1 non-ASCII character (√')

one way it to find the ascii characters from given UTF-8 string , excluding those i'll get the non-ASCII characters.

Given the following information from https://en.wikipedia.org/wiki/UTF-8#Description:
info 1:

One-byte codes are used only for the ASCII values 0 through 127. In this case the UTF-8 code has the same value as the ASCII code. The high-order bit of these codes is always 0



info :2

another way is to find the UTF-8 code for a character. All ASCII character are range from U+0000 to U+007F



Using the any of the above info , how can i find non-ASCII character ? (or if there is any other way to find )

FYI:using gcc compiler

Thanks


4 years ago
Thanks Bear, to pointing out mistake. i forgot to add refine_box as a id.


javascript code


i am new to javascript/jquery , this might seem easy for a seasoned developer. i tried online for long time could not find solution

i have this check boxes



i want to get the checkbox value when it is clicked, itried like


can someone guide me on this.
i wan to set the size of a panel width as 50 and height as 50. for that i used setSize() of Jpanel class but no use. The whole frame is coming yellow , it means its size 50*50 is not set.
here is code



what am i missing here ?
5 years ago
made changes this



and that



And it worked......this is best place....
Thanks Bear.
Hi ranchers,
i'm getting the json data from GET request. now i want to place inside <body> tag in proper order.
json.items returns the array
like



And there are 10 or more such items array in json data.
Now i want to display some items element in some order like






I tired like this


but it is showing like



how can i get desired order ?

hi ranchers ,

i'm developing a application in JavaScript for TItanium(Android) where i need to execute a query something like :
i had number of rows in database with same date so i need to figure out that for each date how many rows are there
let say

above is working fine it is returing 2 rows

but i need to pass date in a variable like


its not working as desired returning 0 rows.how can i resolve this?
command line interface
5 years ago
hi ranchers,

i ' m interested in learning the unix. can someone recommend book(s).

i have been browsing through the online version of The Art of Unix Programming but i think it is not for a beginner . Its more of philosophy of unix and evolution of the unix.

regards
naveen
5 years ago
public void paint(Graphics g) {

g.drawRect (100, 50, width, height);

}

Graphic class has drawRect() to draw rectangle, will it not work f i create grid of these rectangle ?
5 years ago
how about creating a grid of rectangles using Graphics2D class ?
5 years ago
hi ranchers,

Need suggestion for developing the Gui interface of Conway Game of Life. I think Swing does not have components to display a grid of cells.

Please suggest a library or api to create a gui.
5 years ago
i have got the api key. do i have to set the custom search engine ?
5 years ago
hi ranchers,
I have given a project assignment of a web crawler with specific reqiurements as following:

when user searches for a product name like samsung , iphone, etc. it can be any product.

1. the web crawler has to find first 10 links that Google searches for that product.
2. For each of those link It had to find images , link, contact detail ,article , facebook page,twitter page.
3. display all these info in a html page



Now i have specific questions:
how can i find first 10 pages of Google for particular input (in my case a product) ?
Is there third-party library which can be useful ?

Any guidance in this regard be appreciated.
5 years ago