• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 20:17
CET 02:17
KST 10:17
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10
Community News
Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win3RSL Season 3: RO16 results & RO8 bracket13
StarCraft 2
General
BGE Stara Zagora 2026 announced Weekly Cups (Nov 24-30): MaxPax, Clem, herO win SC2 Proleague Discontinued; SKT, KT, SGK, CJ disband Information Request Regarding Chinese Ladder SC: Evo Complete - Ranked Ladder OPEN ALPHA
Tourneys
$5,000+ WardiTV 2025 Championship Constellation Cup - Main Event - Stellar Fest RSL Revival: Season 3 Tenacious Turtle Tussle [Alpha Pro Series] Nice vs Cure
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress Mutation # 500 Fright night Mutation # 499 Chilling Adaptation
Brood War
General
BW General Discussion [ASL20] Ask the mapmakers — Drop your questions Which season is the best in ASL? FlaSh's Valkyrie Copium BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[Megathread] Daily Proleagues [BSL21] RO16 Group B - Sunday 21:00 CET [BSL21] RO16 Group C - Saturday 21:00 CET Small VOD Thread 2.0
Strategy
Game Theory for Starcraft How to stay on top of macro? Current Meta PvZ map balance
Other Games
General Games
Stormgate/Frost Giant Megathread The Perfect Game Path of Exile Nintendo Switch Thread Should offensive tower rushing be viable in RTS games?
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas TL Mafia Community Thread
Community
General
Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread US Politics Mega-thread The Big Programming Thread Artificial Intelligence Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Where to ask questions and add stream? The Automated Ban List
Blogs
James Bond movies ranking - pa…
Topin
Esports Earnings: Bigger Pri…
TrAiDoS
Thanks for the RSL
Hildegard
Saturation point
Uldridge
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1323 users

The Big Programming Thread - Page 358

Forum Index > General Forum
Post a Reply
Prev 1 356 357 358 359 360 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
Cyx.
Profile Joined November 2010
Canada806 Posts
September 24 2013 22:34 GMT
#7141
So I just got back from a career fair at my university, and I was curious about one of the answers I got for the little programming puzzles one company had up.

It was a pretty simple piece of code that looked like this:

var youShould = from c in "(some string of random characters)" select (char)(c<<5)

and the question was, what language is this in and what does it do?

I guessed C# for the language (having a bit of experience with C# from Unity) and was told 'no, it's written in .NET', whereupon I was kind of like 'oh, okay...' and left it be because I honestly didn't know very much about what .NET was or what it was for. Then upon googling a bit more about it, Wikipedia says:

It includes a large library and provides language interoperability (each language can use code written in other languages) across several programming languages.


which to me confirms what I originally thought about .NET - that it's not a programming language at all, it's a framework you can use with a bunch of different languages (foremost among which is C#). So I guess my question is - is it even possible to write code 'in .NET', or do you just develop using .NET in other languages?
sluggaslamoo
Profile Blog Joined November 2009
Australia4494 Posts
Last Edited: 2013-09-24 23:48:04
September 24 2013 23:41 GMT
#7142
On September 25 2013 07:34 Cyx. wrote:
So I just got back from a career fair at my university, and I was curious about one of the answers I got for the little programming puzzles one company had up.

It was a pretty simple piece of code that looked like this:

var youShould = from c in "(some string of random characters)" select (char)(c<<5)

and the question was, what language is this in and what does it do?

I guessed C# for the language (having a bit of experience with C# from Unity) and was told 'no, it's written in .NET', whereupon I was kind of like 'oh, okay...' and left it be because I honestly didn't know very much about what .NET was or what it was for. Then upon googling a bit more about it, Wikipedia says:

Show nested quote +
It includes a large library and provides language interoperability (each language can use code written in other languages) across several programming languages.


which to me confirms what I originally thought about .NET - that it's not a programming language at all, it's a framework you can use with a bunch of different languages (foremost among which is C#). So I guess my question is - is it even possible to write code 'in .NET', or do you just develop using .NET in other languages?


Correct, don't work for that company, period.

Although I'm guessing the random characters when bit shifted would produce a sentence like

var youShould = "learntoprogram"
Come play Android Netrunner - http://www.teamliquid.net/forum/viewmessage.php?topic_id=409008
Cyx.
Profile Joined November 2010
Canada806 Posts
September 24 2013 23:53 GMT
#7143
On September 25 2013 08:41 sluggaslamoo wrote:
Show nested quote +
On September 25 2013 07:34 Cyx. wrote:
So I just got back from a career fair at my university, and I was curious about one of the answers I got for the little programming puzzles one company had up.

It was a pretty simple piece of code that looked like this:

var youShould = from c in "(some string of random characters)" select (char)(c<<5)

and the question was, what language is this in and what does it do?

I guessed C# for the language (having a bit of experience with C# from Unity) and was told 'no, it's written in .NET', whereupon I was kind of like 'oh, okay...' and left it be because I honestly didn't know very much about what .NET was or what it was for. Then upon googling a bit more about it, Wikipedia says:

It includes a large library and provides language interoperability (each language can use code written in other languages) across several programming languages.


which to me confirms what I originally thought about .NET - that it's not a programming language at all, it's a framework you can use with a bunch of different languages (foremost among which is C#). So I guess my question is - is it even possible to write code 'in .NET', or do you just develop using .NET in other languages?


Correct, don't work for that company, period.

Although I'm guessing the random characters when bit shifted would produce a sentence like

var youShould = "learntoprogram"


Apparently it turned out to be their website or something. I kind of gave up on the whole thing after that lol...
Fission
Profile Blog Joined August 2010
Canada1184 Posts
September 25 2013 00:28 GMT
#7144
On September 25 2013 07:34 Cyx. wrote:
So I just got back from a career fair at my university, and I was curious about one of the answers I got for the little programming puzzles one company had up.

It was a pretty simple piece of code that looked like this:

var youShould = from c in "(some string of random characters)" select (char)(c<<5)

and the question was, what language is this in and what does it do?

I guessed C# for the language (having a bit of experience with C# from Unity) and was told 'no, it's written in .NET', whereupon I was kind of like 'oh, okay...' and left it be because I honestly didn't know very much about what .NET was or what it was for. Then upon googling a bit more about it, Wikipedia says:

Show nested quote +
It includes a large library and provides language interoperability (each language can use code written in other languages) across several programming languages.


which to me confirms what I originally thought about .NET - that it's not a programming language at all, it's a framework you can use with a bunch of different languages (foremost among which is C#). So I guess my question is - is it even possible to write code 'in .NET', or do you just develop using .NET in other languages?


Looks like a .net C# LINQ statement to me . http://code.msdn.microsoft.com/101-LINQ-Samples-3fb9811b
Sluggy
Profile Joined June 2010
United States128 Posts
Last Edited: 2013-09-25 02:27:33
September 25 2013 01:55 GMT
#7145
On September 25 2013 08:53 Cyx. wrote:
Show nested quote +
On September 25 2013 08:41 sluggaslamoo wrote:
On September 25 2013 07:34 Cyx. wrote:
So I just got back from a career fair at my university, and I was curious about one of the answers I got for the little programming puzzles one company had up.

It was a pretty simple piece of code that looked like this:

var youShould = from c in "(some string of random characters)" select (char)(c<<5)

and the question was, what language is this in and what does it do?

I guessed C# for the language (having a bit of experience with C# from Unity) and was told 'no, it's written in .NET', whereupon I was kind of like 'oh, okay...' and left it be because I honestly didn't know very much about what .NET was or what it was for. Then upon googling a bit more about it, Wikipedia says:

It includes a large library and provides language interoperability (each language can use code written in other languages) across several programming languages.


which to me confirms what I originally thought about .NET - that it's not a programming language at all, it's a framework you can use with a bunch of different languages (foremost among which is C#). So I guess my question is - is it even possible to write code 'in .NET', or do you just develop using .NET in other languages?


Correct, don't work for that company, period.

Although I'm guessing the random characters when bit shifted would produce a sentence like

var youShould = "learntoprogram"


Apparently it turned out to be their website or something. I kind of gave up on the whole thing after that lol...


To give a few more details you don't write code 'in' .NET, you write code that compiles to CIL. The compiled CIL is further (just in time) compiled by the CLR in to machine code. It's a lot of acronyms but the wikipedia articles on this are clear:


http://en.wikipedia.org/wiki/List_of_CLI_languages
http://en.wikipedia.org/wiki/Common_Language_Runtime

I'm not sure if one of those languages in that list other than c# can use the syntax they showed you, but it's definitely not all of them - so saying it's written in .NET is retarded as others have pointed out.
meatpudding
Profile Joined March 2011
Australia520 Posts
September 25 2013 02:01 GMT
#7146
On September 22 2013 09:32 bypLy wrote:
i am trying to build a 3d engine from scratch in an semi professional language (GL Basic). first i tried with vector matrix and z buffering but then i switched to ray casting style (doom)
the problem i always encounter is that at a certain point the performance goes rapidly down during rendering. a loop like:
+ Show Spoiler +
for i = 0 to 640
for j = 0 to 480
setpixel(i,j)
next
next

makes everything so slow. no matter of fps. I am just an amateuer, so please give some insight what you think i should do and what language is suitable. I want to do things from scratch (if possible). if i just could make the above loop work i would be happy. I though about C++ rather than Java for my purposes and interest but what about C# ?


Try some OpenGL tutorials, that will be the best way to start developing an engine from scratch. The way you describe by drawing pixels one at a time will be very slow. Besides calculating the pixel colour on a single thread, you will have to write the value to system memory. Each memory access here will take some time. If you use OpenGL to access the GPU, you can tell it to draw an entire polygon, and it will write to dedicated graphics memory. Long story short, it's faster.

Hope that makes sense.

With that said, there are some modern software renderers. The Unlmited Detail engine works in a similar way that you described, except that it is highly threaded, so that if you have 8 cores, then you will be processing 8 different pixels at a time. Also the Brigade engine is doing some kind of path tracing, but it can only do a small number of pixels per frame, and builds up the image over a fraction of a second.
Be excellent to each other.
adwodon
Profile Blog Joined September 2010
United Kingdom592 Posts
September 25 2013 09:49 GMT
#7147
Not really programming related but could anyone advise on software to automate the collection of screengrabs from an application for help files?

Preferably something which could inject messages to the message que to interact with the application to take screengrabs and save them to disc? I'm aware of applications which simulate clicks but that sounds like something which could easily go wrong.
Rixxe
Profile Joined July 2011
United Kingdom136 Posts
September 25 2013 09:59 GMT
#7148
On September 04 2013 01:40 bangsholt wrote:
How are you using Interop? Are you 100% sure that you keep closing all your Word applications, as an example.

Some code around where you're saving could be nice as well.


I know this is a while ago, however you are correct.

Turns out that the save method produces an error, which seems to be at random. Either way, if i call the method again within the catch it will work eventually.

Seems odd, and i've never seen anything like this before.

Cheers muchly.
*bleep* you up in a gangsta style!
Tobberoth
Profile Joined August 2010
Sweden6375 Posts
September 25 2013 10:42 GMT
#7149
On September 25 2013 09:28 Fission wrote:
Show nested quote +
On September 25 2013 07:34 Cyx. wrote:
So I just got back from a career fair at my university, and I was curious about one of the answers I got for the little programming puzzles one company had up.

It was a pretty simple piece of code that looked like this:

var youShould = from c in "(some string of random characters)" select (char)(c<<5)

and the question was, what language is this in and what does it do?

I guessed C# for the language (having a bit of experience with C# from Unity) and was told 'no, it's written in .NET', whereupon I was kind of like 'oh, okay...' and left it be because I honestly didn't know very much about what .NET was or what it was for. Then upon googling a bit more about it, Wikipedia says:

It includes a large library and provides language interoperability (each language can use code written in other languages) across several programming languages.


which to me confirms what I originally thought about .NET - that it's not a programming language at all, it's a framework you can use with a bunch of different languages (foremost among which is C#). So I guess my question is - is it even possible to write code 'in .NET', or do you just develop using .NET in other languages?


Looks like a .net C# LINQ statement to me . http://code.msdn.microsoft.com/101-LINQ-Samples-3fb9811b

This is correct. It's a LINQ statement written in C#. LINQ is a component of .NET and has special syntax in C#, VB.NET etc. The code is definitely C# (You can't do the "select (char)(c<<5)" in VB since VB.NET doesn't support casting that way, and it can't be F# since the left bitshift operator in F# is <<<).

Saying it was written in C# is thus perfectly correct, and saying it was written in .NET is technically incorrect since you can't actually write something IN .NET, you write something USING or RELYING on .NET.
Requizen
Profile Blog Joined March 2011
United States33802 Posts
September 25 2013 18:03 GMT
#7150
meta question.

We have checked out code on a development from a consultant's server through SVN. We want to make this code into a repository for our own SVN, so we can check out the dev server's code to our local machines and get the repository updated whenever they push out code of their own.

Can we even do this?
It's your boy Guzma!
supereddie
Profile Joined March 2011
Netherlands151 Posts
September 25 2013 20:16 GMT
#7151
Isn't it easier just to make a branch on the dev's server?
"Do not try to make difficult things possible, but make simple things simple." - David Platt on Software Design
Holy_AT
Profile Joined July 2010
Austria978 Posts
September 25 2013 20:29 GMT
#7152
On September 26 2013 03:03 Requizen wrote:
meta question.

We have checked out code on a development from a consultant's server through SVN. We want to make this code into a repository for our own SVN, so we can check out the dev server's code to our local machines and get the repository updated whenever they push out code of their own.

Can we even do this?


I think there is some way to set up mirrors or so on alternatively, why don't you let this consultant check in the code on your repository ? I mean you can set permissions in SVN so he can just access what you want him to access.
meatpudding
Profile Joined March 2011
Australia520 Posts
September 26 2013 13:13 GMT
#7153
On September 26 2013 03:03 Requizen wrote:
meta question.

We have checked out code on a development from a consultant's server through SVN. We want to make this code into a repository for our own SVN, so we can check out the dev server's code to our local machines and get the repository updated whenever they push out code of their own.

Can we even do this?


Use the svn switch command.
Be excellent to each other.
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2013-09-27 19:03:14
September 27 2013 18:52 GMT
#7154
I'm thinking how I'd make Sudoku by using Java.

What data structure should I use in your opinion? I was thinking of a simple 2D array.

How should I represent the grid graphically though? Via images of numbers? Like 1.jpg, 2.jpg, 3.jpg, etc?

E: Is having little text fields better instead of images?
Requizen
Profile Blog Joined March 2011
United States33802 Posts
September 27 2013 19:28 GMT
#7155
Either works, honestly. I don't see how one would be better than the other, images would let you pretty it up more but text would likely be slightly easier to configure if you're trying to do it quick and dirty.
It's your boy Guzma!
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
September 27 2013 19:33 GMT
#7156
I agree images could make it look a bit better, but input may be ugly. Should there be a side field where you type a value? I guess what I'm asking is, how input view should look like if I use images instead? Where do users type?
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
Last Edited: 2013-09-27 19:41:42
September 27 2013 19:38 GMT
#7157
On September 28 2013 03:52 darkness wrote:
I'm thinking how I'd make Sudoku by using Java.

What data structure should I use in your opinion? I was thinking of a simple 2D array.

How should I represent the grid graphically though? Via images of numbers? Like 1.jpg, 2.jpg, 3.jpg, etc?

E: Is having little text fields better instead of images?


I'd go with text since you can use it to enter the data as well.

A 2D array of ints is a good choice, though personally i prefer 1D arrays with a little extra math. I also use a predefined second array of equal size to map indexes to the 3x3 blocks, which avoids some of the math since you just have to look in the array in which block you are and then you can find all the other blocks the same way.

Also, go for something simple, don't optimize anything. Even an easy and slow solution will solve the hardest Sudoku riddles in less than a second.

A simple PHP solution i wrote a few weeks ago for a job application in case you get stuck. Open the spoiler at your own risk:
+ Show Spoiler +


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Sudoku</title>
<style type="text/css">
.input
{
border: dotted 1px #CCCCCC;
margin: 0;
padding: 1px;
width: 20px;
height: 20px;
text-align: right;
display: block;
float: left;
}

.top { border-top: solid 1px #000000; }
.left { border-left: solid 1px #000000; }
.right { border-right: solid 1px #000000; }
.bottom{ border-bottom: solid 1px #000000; }
</style>
</head>
<body>
<?php

$is_input = array(
0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0
);

$data = array(
0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0
);

function check_valid_source(&$data)
{
for ($i = 0; $i < 81; ++$i)
{
if ($data[$i] != 0)
{
$values = get_valid_values($i, $data);
if (!in_array($data[$i], $values)) return false;
}
}
return true;
}

function get_block_indices($index)
{
if ($index >= 81) throw new Exception("Invalid Index. Cannot get block info");
$indices = array();
$index_to_block_map = array(
0,0,0,1,1,1,2,2,2,
0,0,0,1,1,1,2,2,2,
0,0,0,1,1,1,2,2,2,
3,3,3,4,4,4,5,5,5,
3,3,3,4,4,4,5,5,5,
3,3,3,4,4,4,5,5,5,
6,6,6,7,7,7,8,8,8,
6,6,6,7,7,7,8,8,8,
6,6,6,7,7,7,8,8,8
);

$block_index = $index_to_block_map[$index];
for ($i = 0; $i < 81; ++$i)
{
if ($index_to_block_map[$i] == $block_index)
{
array_push($indices, $i);
}
}
return $indices;
}

function get_valid_values($index, &$data)
{
if ($index >= 81) return array();

$valid_values = array(1,2,3,4,5,6,7,8,9);
$row = ((int)($index / 9)) * 9;
$col = (int)($index % 9);
$block_indices = get_block_indices($index);
for ($i = 0; $i < 9; ++$i)
{
if (($row + $i != $index) && ($data[$row + $i] != 0)) $valid_values[$data[$row + $i] - 1] = 0;
if (($col + ($i * 9) != $index) && ($data[$col + ($i * 9)] != 0)) $valid_values[$data[$col + ($i * 9)] - 1] = 0;
if (($block_indices[$i] != $index) && ($data[$block_indices[$i]] != 0)) $valid_values[$data[$block_indices[$i]] - 1] = 0;
}

return array_filter($valid_values);
}

for ($i = 0; $i < 81; ++$i)
{
$data[$i] = (isset($_POST["input"][$i])) ? (int)($_POST["input"][$i]) : 0;
if ($data[$i] != 0) $is_input[$i] = 1;
}

$watchdog = 0;
$index = 0;
$solved = 0;
if (count(array_filter($is_input)) > 0)
{
try
{
if (!check_valid_source($data)) throw new Exception("Unsolvable. Conflict in source!");

while (!$solved)
{
if ($index == 81) { $solved = 1; break; }
if (++$watchdog > 100000000) throw new Exception("Watchdog!");

for ($i = $index + 1; $i < 81; ++$i)
{
$data[$i] = $data[$i] * $is_input[$i];
}

if (!$is_input[$index])
{
$value = 0;
$valid_values = get_valid_values($index, $data);
do
{
$value = (int)array_shift($valid_values);
} while (($value != 0) && ($value <= $data[$index]));

if ($value == 0)
{
while (($is_input[--$index]) && ($index >= 0));
if ($index < 0) throw new Exception("Unsolvable");
}
else
{
$data[$index] = $value;
++$index;
}
}
else
{
++$index;
}
}
}
catch (Exception $ex)
{
echo $ex->getMessage();
}
}
?>
<form action="index.php" method="post" style="margin: 0; padding: 0">
<div>
<?php for ($y = 0; $y < 81; $y += 9): ?>
<?php for ($x = 0; $x < 9; ++$x): ?>
<?php $classes = array("input"); ?>
<?php if (($x % 3) == 0) array_push($classes, "left"); ?>
<?php if (($y % 27) == 0) array_push($classes, "top"); ?>
<?php if ($y == 72) array_push($classes, "bottom"); ?>
<?php if ($x == 8) array_push($classes, "right"); ?>
<input type="text" name="input[]" value="<?= $data[$x + $y] ?>" class="<?= implode(" ", $classes) ?>" />
<?php endfor; ?>
<div style="clear: both;"></div>
<?php endfor; ?>
<div style="clear: both;"></div>
<input type="submit" value="Solve!" />
</div>
</form>
</body>
</html>

Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2013-09-27 20:10:59
September 27 2013 20:09 GMT
#7158
I actually found a Sudoku game which uses images: http://www.miniclip.com/games/sudoku/en/

Such a nice idea to have some sort of keypad where you select a number from, then you point the box (image) to have that number there. You even eliminate the use of keyboard to make lazy users happy, lol.

Also, thanks for insights.
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
September 27 2013 20:25 GMT
#7159
Arrays of indices imo seem pretty ugly for stuff where you do actual operations on the sudoku grid. I'd hide that in something like say a SudokuGrid class which gives access to SudokuCell or SudokuBlock elements, and has access methods like Cell(row, col). Stuff everything into an internal array then and the accessors do some simple math to find the right cell/block.

a[b[i]] constructs just are confusing.
If you have a good reason to disagree with the above, please tell me. Thank you.
icystorage
Profile Blog Joined November 2008
Jollibee19350 Posts
September 28 2013 04:24 GMT
#7160
+ Show Spoiler +
Pattern p = Pattern.compile("[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?");
Matcher m = p.matcher("-0.2847715");
if (m.find()) {
System.out.println(m.group(1));
}


why does it return null? is the regex wrong?
LiquidDota StaffAre you ready for a Miracle-? We are! The International 2017 Champions!
Prev 1 356 357 358 359 360 1032 Next
Please log in or register to reply.
Live Events Refresh
PiGosaur Monday
01:00
#60
PiGStarcraft494
CranKy Ducklings46
rockletztv 8
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft494
SteadfastSC 57
Nathanias 52
CosmosSc2 36
StarCraft: Brood War
Artosis 718
ZZZero.O 77
NaDa 59
League of Legends
C9.Mang0298
Counter-Strike
minikerr36
Super Smash Bros
PPMD75
Other Games
summit1g10021
Grubby2748
FrodaN1622
Day[9].tv799
shahzam574
taco 179
capcasts146
ViBE81
Mew2King46
Organizations
Other Games
gamesdonequick1022
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• davetesta56
• Freeedom1
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Other Games
• Scarra1349
• imaqtpie1294
• Day9tv799
Upcoming Events
Wardi Open
10h 43m
StarCraft2.fi
15h 43m
Replay Cast
22h 43m
The PondCast
1d 8h
OSC
1d 14h
Demi vs Mixu
Nicoract vs TBD
Babymarine vs MindelVK
ForJumy vs TBD
Shameless vs Percival
Replay Cast
1d 22h
Korean StarCraft League
3 days
CranKy Ducklings
3 days
SC Evo League
3 days
BSL 21
3 days
Sziky vs OyAji
Gypsy vs eOnzErG
[ Show More ]
OSC
3 days
Solar vs Creator
ByuN vs Gerald
Percival vs Babymarine
Moja vs Krystianer
EnDerr vs ForJumy
sebesdes vs Nicoract
Sparkling Tuna Cup
4 days
OSC
4 days
BSL 21
4 days
Bonyth vs StRyKeR
Tarson vs Dandy
Replay Cast
5 days
Wardi Open
5 days
StarCraft2.fi
5 days
Replay Cast
5 days
StarCraft2.fi
6 days
PiGosaur Monday
6 days
Liquipedia Results

Completed

Proleague 2025-11-30
RSL Revival: Season 3
Light HT

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
CSCL: Masked Kings S3
Slon Tour Season 2
Acropolis #4 - TS3
META Madness #9
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
Kuram Kup
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.