• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 01:03
CEST 07:03
KST 14:03
  • 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
Serral wins Maestros of the Game 237ByuL, and the Limitations of Standard Play3Team Liquid Map Contest #22: Results and Winners7Code S Season 2 (2026): RO4 and Finals Preview12TL.net Map Contest #22 - Voting & Ladder Map Selection7
Community News
BSL Season 22 Full Overview & Conclusion5BSL Season 22 Full Overview & Conclusion5Weekly Cups (June 29-July 5): Solar Doubles0MC vs IdrA, Boxer vs Nal_rA to be Legacy Matches @ BlizzCon445.0.16 Hotfix (June 30) - Balance + Bug Fixes40
StarCraft 2
General
Serral wins Maestros of the Game 2 Most successful SC2 players of Q2 2026 MC vs IdrA, Boxer vs Nal_rA to be Legacy Matches @ BlizzCon Is the larve respawn broken? 5.0.16 patch for SC2 goes live (8 worker start)
Tourneys
RSL Revival: Season 6 - Qualifiers and Main Event GSL CK #5 Race War HomeStory Cup 29 Vespene Cup #1 — $300+ USD, July 10 Sea Duckling Open (Global, Bronze-Diamond)
Strategy
[G] Having the right mentality to improve
Custom Maps
New Map Maker - Looking for Advice - Love or Hate Work In Progress Melee Maps [D]RTS in all its shapes and glory <3
External Content
Mutation # 533 Die Together The PondCast: SC2 News & Results Mutation # 532 Nuclear Family Mutation # 531 Experimental Artillery
Brood War
General
ASL22 General Discussion BW General Discussion BGH Auto Balance -> http://bghmmr.eu/ BSL Season 22 Full Overview & Conclusion ASL 22 Proposed Map Pool
Tourneys
[ASL22] Wildcard Qualifier [Megathread] Daily Proleagues IPSL Spring 2026 Top 4! CSLAN 4 is Coming!
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers Creating a full chart of Zerg builds Relatively freeroll strategies
Other Games
General Games
Summer Games Done Quick 2026! General RTS Discussion Thread Nintendo Switch Thread Stormgate/Frost Giant Megathread Dawn of War IV
Dota 2
Looking for a Dota Mentor 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
TL Mafia
NeO.D_StephenKing vs This Guy From 1 Million Dance TL Mafia Community Thread TL Mafia Power Rank Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread UK Politics Mega-thread YouTube Thread Canadian Politics Mega-thread
Fan Clubs
The IdrA Fan Club The HerO Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! Series you have seen recently...
Sports
2024 - 2026 Football Thread McBoner: A hockey love story Tennis[sport] Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
FPS when play League Of Legend on laptop How to clean a TTe Thermaltake keyboard? Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Major Shifts in the Gaming I…
TrAiDoS
An Exploration of th…
waywardstrategy
Gauntlet SC2: A Retrospectiv…
Ctone23
ramps on octagon
StaticNine
Funny Nicknames
LUCKY_NOOB
Evil Gacha Games and the…
ffswowsucks
Customize Sidebar...

Website Feedback

Closed Threads



Active: 8925 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
Next event in 3h 57m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
WinterStarcraft718
RuFF_SC2 212
ProTech108
StarCraft: Brood War
Sea 2570
Pusan 144
Mind 69
Icarus 10
Dota 2
NeuroSwarm307
LuMiX1
League of Legends
JimRising 815
Counter-Strike
summit1g10090
Other Games
m0e_tv484
UpATreeSC48
Organizations
Other Games
gamesdonequick36200
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 12 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• Azhi_Dahaki21
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• HappyZerGling77
Upcoming Events
RSL Revival
3h 57m
Solar vs Rogue
Maru vs NightMare
Sparkling Tuna Cup
4h 57m
IPSL
10h 57m
Bonyth vs Hawk
GSL
1d 5h
Replay Cast
1d 18h
WardiTV Weekly
2 days
The PondCast
3 days
Replay Cast
4 days
CrankTV Team League
4 days
Replay Cast
5 days
[ Show More ]
CrankTV Team League
5 days
Replay Cast
5 days
RSL Revival
6 days
Clem vs Lambo
Scarlett vs Cure
CranKy Ducklings
6 days
Liquipedia Results

Completed

ASL Season 22: Wild Card Qualifier
HSC XXIX
Eternal Conflict S2 E1

Ongoing

IPSL Spring 2026
Acropolis #4
YSL S3
CSL 2026 Summer (S21)
RSL Revival: Season 6
CranK Gathers Season 4: BW vs SC2 Team League
SCTL 2026 Spring
Eternal Conflict S2 E2
XSE Pro League 2026
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

Upcoming

Escore Tournament S3: W3
ASL S22 SEASON OPEN Day 1
Escore Tournament S3: W4
ASL S22 SEASON OPEN Day 2
Escore Tournament S3: W5
CSLAN 4
Blizzard Classic Cup 2026
HSC XXX
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
Light Tournament 2026
Eternal Conflict S2 Finale
Eternal Conflict S2 E3
Logitech G Connect 2026
StarSeries Fall 2026
FISSURE Playground #5
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
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.