• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 19:09
CEST 01:09
KST 08:09
  • 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
[ASL21] Ro24 Preview Pt2: News Flash10[ASL21] Ro24 Preview Pt1: New Chaos0Team Liquid Map Contest #22 - Presented by Monster Energy18ByuL: The Forgotten Master of ZvT30Behind the Blue - Team Liquid History Book20
Community News
$5,000 WardiTV TLMC tournament - Presented by Monster Energy2GSL CK: More events planned pending crowdfunding3Weekly Cups (May 30-Apr 5): herO, Clem, SHIN win0[BSL22] RO32 Group Stage4Weekly Cups (March 23-29): herO takes triple6
StarCraft 2
General
Quebec Clan still alive ? BGE Stara Zagora 2026 cancelled Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool Weekly Cups (May 30-Apr 5): herO, Clem, SHIN win Rongyi Cup S3 - Preview & Info
Tourneys
GSL CK: More events planned pending crowdfunding $5,000 WardiTV TLMC tournament - Presented by Monster Energy Sparkling Tuna Cup - Weekly Open Tournament RSL Season 4 announced for March-April Sea Duckling Open (Global, Bronze-Diamond)
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
The PondCast: SC2 News & Results Mutation # 520 Moving Fees Mutation # 519 Inner Power Mutation # 518 Radiation Zone
Brood War
General
ASL21 General Discussion so ive been playing broodwar for a week straight. BW General Discussion Gypsy to Korea Pros React To: JaeDong vs Queen
Tourneys
Escore Tournament StarCraft Season 2 [Megathread] Daily Proleagues [ASL21] Ro24 Group F [BSL22] RO32 Group B - Sunday 21:00 CEST
Strategy
Fighting Spirit mining rates Muta micro map competition What's the deal with APM & what's its true value Simple Questions, Simple Answers
Other Games
General Games
Stormgate/Frost Giant Megathread General RTS Discussion Thread Starcraft Tabletop Miniature Game Nintendo Switch Thread Darkest Dungeon
Dota 2
The Story of Wings Gaming Official 'what is Dota anymore' discussion
League of Legends
G2 just beat GenG in First stand
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 Five o'clock TL Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread The China Politics Thread European Politico-economics QA Mega-thread Trading/Investing Thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion Cricket [SPORT] Tokyo Olympics 2021 Thread
World Cup 2022
Tech Support
[G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Loot Boxes—Emotions, And Why…
TrAiDoS
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
ASL S21 English Commentary…
namkraft
StarCraft improvement
iopq
Electronics
mantequilla
Any Web Designers Out there?…
sob3k
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1485 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
The PiG Daily
20:15
Best Games of SC
Rogue vs TriGGeR
Maru vs MaxPax
Rogue vs herO
Clem vs herO
Rogue vs Maru
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft454
JuggernautJason36
StarCraft: Brood War
Britney 11285
Shuttle 390
Jaeyun 43
NaDa 12
Dota 2
Pyrionflax357
capcasts201
canceldota162
Counter-Strike
minikerr10
Super Smash Bros
hungrybox290
C9.Mang0259
Other Games
gofns27503
summit1g15601
tarik_tv5725
ZombieGrub167
ViBE90
ROOTCatZ16
PPMD15
Organizations
Other Games
gamesdonequick230
StarCraft 2
angryscii 31
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 18 non-featured ]
StarCraft 2
• musti20045 29
• RyuSc2 15
• OhrlRock 1
• LaughNgamezSOOP
• AfreecaTV YouTube
• sooper7s
• intothetv
• Kozan
• IndyKCrew
• Migwel
StarCraft: Brood War
• blackmanpl 43
• RayReign 28
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• WagamamaTV1028
League of Legends
• Doublelift4015
Other Games
• imaqtpie1106
Upcoming Events
CranKy Ducklings
10h 51m
WardiTV Team League
11h 51m
uThermal 2v2 Circuit
15h 51m
IPSL
16h 51m
Hawk vs TBD
StRyKeR vs TBD
BSL
19h 51m
n0maD vs perroflaco
TerrOr vs ZZZero
MadiNho vs WolFix
DragOn vs LancerX
Sparkling Tuna Cup
1d 10h
WardiTV Team League
1d 11h
OSC
1d 13h
BSL
1d 19h
Sterling vs Azhi_Dahaki
Napoleon vs Mazur
Jimin vs Nesh
spx vs Strudel
IPSL
1d 19h
Artosis vs TBD
Napoleon vs TBD
[ Show More ]
Replay Cast
2 days
Wardi Open
2 days
Afreeca Starleague
2 days
Soma vs YSC
Sharp vs sSak
Afreeca Starleague
3 days
Snow vs PianO
hero vs Rain
GSL
3 days
Replay Cast
4 days
Kung Fu Cup
4 days
The PondCast
5 days
Escore
6 days
Liquipedia Results

Completed

Proleague 2026-04-09
RSL Revival: Season 4
NationLESS Cup

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
StarCraft2 Community Team League 2026 Spring
Nations Cup 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026

Upcoming

IPSL Spring 2026
Escore Tournament S2: W3
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
RSL Revival: Season 5
WardiTV TLMC #16
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
IEM Rio 2026
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 © 2026 TLnet. All Rights Reserved.