• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 23:01
CEST 05:01
KST 12:01
  • 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 HomeStory Cup 2910Serral wins Maestros of the Game 243ByuL, and the Limitations of Standard Play3Team Liquid Map Contest #22: Results and Winners7Code S Season 2 (2026): RO4 and Finals Preview12
Community News
Reynor: GSL Loss Wasn't About Preparation Format9[IPSL] Spring 2026 Grand Finals - This Weekend!0Weekly Cups (July 6 - 12): Protoss strike back5BSL Season 22 Full Overview & Conclusion8BSL Season 22 Full Overview & Conclusion8
StarCraft 2
General
Weekly Cups (July 6 - 12): Protoss strike back Reynor: GSL Loss Wasn't About Preparation Format Co-op Commander Guide: Kerrigan Serral wins HomeStory Cup 29 Is the larve respawn broken?
Tourneys
GSL CK #5 Race War WardiTV Summer Cup 2026 RSL Revival: Season 6 - Qualifiers and Main Event HomeStory Cup 29 Vespene Cup #1 — $300+ USD, July 10
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
The PondCast: SC2 News & Results Mutation # 534 Burning Evacuation Mutation # 533 Die Together Mutation # 532 Nuclear Family
Brood War
General
Pros Debate: Zerg Unfairly Nerfed? (ASL S22 map) screpdb: new Starcraft reporting tool BSL Season 22 Full Overview & Conclusion BGH Auto Balance -> http://bghmmr.eu/ ASL 22 Proposed Map Pool
Tourneys
[Megathread] Daily Proleagues [IPSL] Spring 2026 Grand Finals - This Weekend! [ASL22] Wildcard Qualifier IPSL Spring 2026 Top 4!
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers Creating a full chart of Zerg builds Relatively freeroll strategies
Other Games
General Games
Nintendo Switch Thread General RTS Discussion Thread Stormgate/Frost Giant Megathread Path of Exile Summer Games Done Quick 2026!
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 [Req][Books] Good Fantasy/SciFi books 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
Simple Questions Simple Answers FPS when play League Of Legend on laptop How to clean a TTe Thermaltake keyboard?
TL Community
The Automated Ban List
Blogs
The Experiences We Want and …
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: 7665 users

The Big Programming Thread - Page 204

Forum Index > General Forum
Post a Reply
Prev 1 202 203 204 205 206 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.
tofucake
Profile Blog Joined October 2009
Hyrule19228 Posts
Last Edited: 2012-11-27 17:18:37
November 27 2012 17:17 GMT
#4061
On November 28 2012 02:07 nakam wrote:
Show nested quote +
On November 28 2012 01:57 FreezingAssassin wrote:
We are currently working in HTML where we use a <a href> to link two pages together as you all know. But What my question is my instructor said there was a possible way for us to link pages without copying and pasting all the a href tags to every single page just to make it work.

He said there was a way to link them from another source and it would make it that much easier. So my question is what is the other way to link them?

Frames?

we do not speak of frames any longer...
Liquipediaasante sana squash banana
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2012-11-27 17:37:36
November 27 2012 17:23 GMT
#4062
On November 28 2012 01:57 FreezingAssassin wrote:
We are currently working in HTML where we use a <a href> to link two pages together as you all know. But What my question is my instructor said there was a possible way for us to link pages without copying and pasting all the a href tags to every single page just to make it work.

He said there was a way to link them from another source and it would make it that much easier. So my question is what is the other way to link them?


Static Site Generation?

link

Whoa, 10k!
There is no one like you in the universe.
nakam
Profile Joined April 2010
Sweden245 Posts
November 27 2012 17:34 GMT
#4063
On November 28 2012 02:17 tofucake wrote:
Show nested quote +
On November 28 2012 02:07 nakam wrote:
On November 28 2012 01:57 FreezingAssassin wrote:
We are currently working in HTML where we use a &lt;a href&gt; to link two pages together as you all know. But What my question is my instructor said there was a possible way for us to link pages without copying and pasting all the a href tags to every single page just to make it work.

He said there was a way to link them from another source and it would make it that much easier. So my question is what is the other way to link them?

Frames?

we do not speak of frames any longer...

Of course not. It would be terrible if they teach that stuff, but it basically does that.

Oh, and you are damn close a big number of posts.
TL Local Timezone Script - http://www.teamliquid.net/forum/viewmessage.php?topic_id=277156
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
November 27 2012 21:04 GMT
#4064
On November 27 2012 16:37 phar wrote:
I don't really understand what you're trying to do.


public class Foo {

private final Socket client;
private final PrintWriter out;

Foo(Socket s) {
this.client = checkNotNull(s, "socket must not be null");
this.out = new PrintWriter(new OutputStreamWriter(client.getOutputStream()));
}
}


That lets you use 'client' and 'out' anywhere in the scope of the class. If you need to use 'out' from another class, make a method to access it:

public class Foo {
...

public void writeString(String string) {
out.println(string);
}
}


Instantiate foo, call foo.writeString.

Really hard to give more specific advice without knowing the situation more. But in general, you should reserve static references from outside a class into another (e.g. Preconditions.checkNotNull) for things that do not rely on any state that can change. It's ok for helper methods that rely only on constants and arguments passed in directly to the method, but it's really not kosher to have it reference something from a constructor. What happens when someone calls that static method without having previously called the constructor? Probably lots of NPEs (if you're lucky), or random wonky shit.

There are other reasons to use or avoid static variables or static methods, but they're probably out of scope for what you need to know now.


Thanks. It works now.
phar
Profile Joined August 2011
United States1080 Posts
November 28 2012 01:11 GMT
#4065
Sweet
Who after all is today speaking about the destruction of the Armenians?
white_horse
Profile Joined July 2010
1019 Posts
Last Edited: 2012-11-28 02:02:12
November 28 2012 02:02 GMT
#4066
How do I write the c++ code

for (i = stepsToTry; ((i > 0) && (atHome == false)); i = i - 1)


in matlab code?

For loops in matlab don't let you have conditionals like the "((i > 0) && (atHome == false))" so I'm kind of stuck with where to start.
Translator
CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
Last Edited: 2012-11-28 02:07:33
November 28 2012 02:06 GMT
#4067
On November 28 2012 11:02 white_horse wrote:
How do I write the c++ code

for (i = stepsToTry; ((i > 0) && (atHome == false)); i = i - 1)


in matlab code?

For loops in matlab don't let you have conditionals like the "((i > 0) && (atHome == false))" so I'm kind of stuck with where to start.

Those are called "logical operators". So in matlab you use words instead of the C symbols. The greater and lesser are "relational operators", or comparison operators.

So in all you need to google:
matlab logical operators
matlab comparison operators
matlab for loop
Jadoreoov
Profile Joined December 2009
United States76 Posts
Last Edited: 2012-11-28 02:28:19
November 28 2012 02:25 GMT
#4068
In Matlab for loops can only be used for data ranges, for example:
for i=1:10
%loop
end
Is a loop where i is 1 for the first iteration, then 2, etc.

Note there isn't a conditional here. Also, the data range is saved when the loop is first entered, so:
x=5;
for i=1:x
x = x+1
end
This loop will only loop 5 times since when the loop is entered the data range of i is set to 1:5 (the initial value of x)

The only way to do what you wanted to do is:
i = stepsToTry;
while (i>0) && (atHome == 0)
%do stuff
i=i-1
end

Note that there is no true or false in Matlab, just 0=false and non-0=true. (There technically is an internal boolean type, but there is no true and false keywords). Also instead of checking atHome==0 you could just check ~atHome (~ is logical not in Matlab)

The only thing you have to be careful of this while construction is that the i=i-1 step will be done one extra time
compared to the c++ for-loop.
Millitron
Profile Blog Joined August 2010
United States2611 Posts
November 28 2012 02:54 GMT
#4069
I may end up throwing away a semester's worth of work. I've been writing a UI for a PeopleBot (podium on wheels basically, its meant to give tours autonomously), and I've been writing it in XWindows because we couldn't get a JVM to install on the robot. XWindows has been a huge pain, I really appreciate Java.Swing now. Just last week, we updated the version of Linux on the robot, and it looks like we'll be able to install a JVM after all. All my work this semester may have been for naught.
Who called in the fleet?
zhurai
Profile Blog Joined September 2010
United States5660 Posts
November 28 2012 02:58 GMT
#4070
On November 28 2012 01:57 FreezingAssassin wrote:
We are currently working in HTML where we use a &lt;a href&gt; to link two pages together as you all know. But What my question is my instructor said there was a possible way for us to link pages without copying and pasting all the a href tags to every single page just to make it work.

He said there was a way to link them from another source and it would make it that much easier. So my question is what is the other way to link them?


Server Side Includes if that's possible is another way than frames

+ Show Spoiler +
also if your instructor is actually seriously trying to get you guys to use iframes... needs to be fired. >_>#
frames
are
out
of
date
and
really
stupid.


On November 28 2012 02:07 nakam wrote:
Show nested quote +
On November 28 2012 01:57 FreezingAssassin wrote:
We are currently working in HTML where we use a &lt;a href&gt; to link two pages together as you all know. But What my question is my instructor said there was a possible way for us to link pages without copying and pasting all the a href tags to every single page just to make it work.

He said there was a way to link them from another source and it would make it that much easier. So my question is what is the other way to link them?

Frames?

frames are stupid.

Twitter: @zhurai | Site: http://zhurai.com
Craton
Profile Blog Joined December 2009
United States17294 Posts
November 28 2012 06:14 GMT
#4071
Think of frames like you think of geocities: a fond nostalgic memory you should leave dead.

try
{
using (OracleConnection oracleConnection = new OracleConnection(s3ConnString))
using (OracleCommand oracleCommand = new OracleCommand(cmdText, oracleConnection))
using (DataSet dataSet = new DataSet())
using (OracleDataAdapter oracleDataAdapter = new OracleDataAdapter(oracleCommand))
{
oracleCommand.Connection.Open();
oracleDataAdapter.Fill(dataSet);

if (dataSet.Tables.Count == 0)
throw new SomeCustomException("No tables returned.");
else if (dataSet.Tables.Count > 1)
throw new SomeCustomException("Too many tables returned.");
else
return dataSet.Tables[0];
}
}
catch (SomeCustomException ex) // Is this even worth customizing?
{
// Handling
}
catch (OracleException ex)
{
// Handling
}
catch (Exception ex)
{
// Handling
}


Right now I'm working on rebuilding (from scratch) something of mine around best-practices. I've already got a functional version of what I need to use in the interim, so I can take my time with this. I've written this section of code and would like feedback with regard to how better to do it or if it should be left alone.
twitch.tv/cratonz
tec27
Profile Blog Joined June 2004
United States3702 Posts
November 28 2012 07:24 GMT
#4072
Your code doesn't really make much sense, because if you don't have an exception you return a value, but if you do you don't? Tough to see how this would actually fit into a codebase.

But some things anyway:
  • Exceptions are for exceptional things, something you can check with a simple length equality doesn't meet those criteria. If your function is named specifically to denote it explicitly expects 1 and only 1 table that's fine, but then there would be no point in catching the exception here. So as it is, you're basically using exceptions for flow control (and unnecessarily so).
  • There's basically no good reason to catch Exception, don't do this. And if your "handling" would simply be "throw ex;" or some other such stupidity, I'm going to kill you.
  • You should probably read up on what the using statement does. If you're using the DataSet class from System.Data, I don't believe it implements IDisposable so a using block for that is useless. No idea about the Oracle classes, but this is typically only used for things where there is a finite resource involved, so I'd imagine its only needed for OracleConnection.
  • This one is more controversial for stupid reasons, but use 'var' in your using statements.
    using (OracleCommand oracleCommand = new OracleCommand(cmdText, oracleConnection))
    is far less readable than
    using (var oracleCommand = new OracleCommand(cmdText, oracleConnection))

    You already know its an OracleCommand from both the constructor and the variable name, no point in typing that a 3rd time. I'd probably ditch all the 'variable name same as the type' stuff too, the type isn't what's important about variables. Rather, their function is.


So I would probably rewrite this something like:

using(var connection = new OracleConnection(s3ConnString)) {
var command = new OracleCommand(commandText, connection);
var dataSet = new DataSet();
var dataAdapter = new OracleDataAdapter(command);

command.Connection.Open();
dataAdapter.Fill(dataSet);
if(dataSet.Tables.Count == 1)
return dataSet.Tables[0];

throw new InvalidOperationException("Expected 1 table, got: " + dataSet.Tables.Count);
}
Can you jam with the console cowboys in cyberspace?
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
Last Edited: 2012-11-28 08:06:37
November 28 2012 08:05 GMT
#4073
On November 28 2012 16:24 tec27 wrote:
Your code doesn't really make much sense, because if you don't have an exception you return a value, but if you do you don't? Tough to see how this would actually fit into a codebase.

But some things anyway:
  • Exceptions are for exceptional things, something you can check with a simple length equality doesn't meet those criteria. If your function is named specifically to denote it explicitly expects 1 and only 1 table that's fine, but then there would be no point in catching the exception here. So as it is, you're basically using exceptions for flow control (and unnecessarily so).
  • There's basically no good reason to catch Exception, don't do this. And if your "handling" would simply be "throw ex;" or some other such stupidity, I'm going to kill you.
  • You should probably read up on what the using statement does. If you're using the DataSet class from System.Data, I don't believe it implements IDisposable so a using block for that is useless. No idea about the Oracle classes, but this is typically only used for things where there is a finite resource involved, so I'd imagine its only needed for OracleConnection.
  • This one is more controversial for stupid reasons, but use 'var' in your using statements.
    using (OracleCommand oracleCommand = new OracleCommand(cmdText, oracleConnection))
    is far less readable than
    using (var oracleCommand = new OracleCommand(cmdText, oracleConnection))

    You already know its an OracleCommand from both the constructor and the variable name, no point in typing that a 3rd time. I'd probably ditch all the 'variable name same as the type' stuff too, the type isn't what's important about variables. Rather, their function is.


So I would probably rewrite this something like:

using(var connection = new OracleConnection(s3ConnString)) {
var command = new OracleCommand(commandText, connection);
var dataSet = new DataSet();
var dataAdapter = new OracleDataAdapter(command);

command.Connection.Open();
dataAdapter.Fill(dataSet);
if(dataSet.Tables.Count == 1)
return dataSet.Tables[0];

throw new InvalidOperationException("Expected 1 table, got: " + dataSet.Tables.Count);
}


I agree about the exceptions only for exceptional cases and not using catch(Exception..) - basically if you don't know which exception it is, it is most likely something that you want to handle a few levels higher.

However, i don't agree about var. I dislike that form since i think it removes readability. The first statement you used is a lot more readable than the second since i know what type it is from the first word, i don't have to scan the line to determine what i'm using there. It introduces a bad habit where suddenly every variable gets declared as "var", just because people are too lazy to write the 5 characters more. You don't even have to write it again because Visual Studio will automatically show you the type after writing the "= new " if you specified the type first, you just have to press autocomplete.

Also, C# throws a compile time error if you try to use "using" for something that doesn't implement IDisposable, so it's impossible to use it unneccessarily.
phar
Profile Joined August 2011
United States1080 Posts
November 28 2012 08:16 GMT
#4074
Only thing I have to add to tec's comments above:

Is it ever possible for OracleDataAdapter to yield a null dataSet.Tables prop? If you're not 100% sure it will always be non-null (and will always be non-null forever), you should probably do a quick null check.


As an aside, there are some cases where it's a good idea to catch Exception, but they are few and far between (and likely not here).
Who after all is today speaking about the destruction of the Armenians?
Tobberoth
Profile Joined August 2010
Sweden6375 Posts
November 28 2012 08:23 GMT
#4075
Should be noted that in some cases, try/catch is faster than other measures. This is because checking data apriori will always give you the cost of checking, while try/catch will only cost you anything if there's an actual exception (at which point it will be slower than checking apriori).

That said, it's obviously better for readability and maintanence to stay away from exceptions unless you specifically need to handle them.
tec27
Profile Blog Joined June 2004
United States3702 Posts
Last Edited: 2012-11-28 08:46:50
November 28 2012 08:34 GMT
#4076
On November 28 2012 17:05 Morfildur wrote:
Show nested quote +
On November 28 2012 16:24 tec27 wrote:
Your code doesn't really make much sense, because if you don't have an exception you return a value, but if you do you don't? Tough to see how this would actually fit into a codebase.

But some things anyway:
  • Exceptions are for exceptional things, something you can check with a simple length equality doesn't meet those criteria. If your function is named specifically to denote it explicitly expects 1 and only 1 table that's fine, but then there would be no point in catching the exception here. So as it is, you're basically using exceptions for flow control (and unnecessarily so).
  • There's basically no good reason to catch Exception, don't do this. And if your "handling" would simply be "throw ex;" or some other such stupidity, I'm going to kill you.
  • You should probably read up on what the using statement does. If you're using the DataSet class from System.Data, I don't believe it implements IDisposable so a using block for that is useless. No idea about the Oracle classes, but this is typically only used for things where there is a finite resource involved, so I'd imagine its only needed for OracleConnection.
  • This one is more controversial for stupid reasons, but use 'var' in your using statements.
    using (OracleCommand oracleCommand = new OracleCommand(cmdText, oracleConnection))
    is far less readable than
    using (var oracleCommand = new OracleCommand(cmdText, oracleConnection))

    You already know its an OracleCommand from both the constructor and the variable name, no point in typing that a 3rd time. I'd probably ditch all the 'variable name same as the type' stuff too, the type isn't what's important about variables. Rather, their function is.


So I would probably rewrite this something like:

using(var connection = new OracleConnection(s3ConnString)) {
var command = new OracleCommand(commandText, connection);
var dataSet = new DataSet();
var dataAdapter = new OracleDataAdapter(command);

command.Connection.Open();
dataAdapter.Fill(dataSet);
if(dataSet.Tables.Count == 1)
return dataSet.Tables[0];

throw new InvalidOperationException("Expected 1 table, got: " + dataSet.Tables.Count);
}


I agree about the exceptions only for exceptional cases and not using catch(Exception..) - basically if you don't know which exception it is, it is most likely something that you want to handle a few levels higher.

However, i don't agree about var. I dislike that form since i think it removes readability. The first statement you used is a lot more readable than the second since i know what type it is from the first word, i don't have to scan the line to determine what i'm using there. It introduces a bad habit where suddenly every variable gets declared as "var", just because people are too lazy to write the 5 characters more. You don't even have to write it again because Visual Studio will automatically show you the type after writing the "= new " if you specified the type first, you just have to press autocomplete.

Also, C# throws a compile time error if you try to use "using" for something that doesn't implement IDisposable, so it's impossible to use it unneccessarily.

Its not about laziness, its about decreasing the amount of code on the screen and focusing on the right issues. When you right out code to enumerate a list, is the important part of that code the enumeration or the type of the list? When you right out code to perform an action on an object, is the important part the type of that object, or the fact that it is able to perform that action? Static typing in its original intentions was meant to protect you from making mistakes, not to make it so you have to demonstrate to the compiler that you're not stupid over and over again. Using var in most cases gets you much closer to that ideal. Along with this, it makes your code focus more on variable naming, and encourages better naming therein.

Decreasing redundancy in your code is a good thing. Decreasing line length without decreasing information is a good thing. You should give it a try instead of just running away from it because you're not used to it. And if you're worried about people "being too lazy", you should perhaps think about having a code review process or not working with people that you can't trust, instead of marking good language features as verboten.
Can you jam with the console cowboys in cyberspace?
AmericanUmlaut
Profile Blog Joined November 2010
Germany2596 Posts
November 28 2012 08:37 GMT
#4077
@Craton: I basically agree with tec's comments above, but I'd add one thing. The try/catch structure you're using is an unnecessary complication. Throwing exceptions is something that allows calling classes to implement their own handling for different classes of error, but if you throw then immediately catch your own exception in a single function, then it's no different then a GOTO. Just put the handling code inside the if block instead:

try
{
using (OracleConnection oracleConnection = new OracleConnection(s3ConnString))
using (OracleCommand oracleCommand = new OracleCommand(cmdText, oracleConnection))
using (DataSet dataSet = new DataSet())
using (OracleDataAdapter oracleDataAdapter = new OracleDataAdapter(oracleCommand))
{
oracleCommand.Connection.Open();
oracleDataAdapter.Fill(dataSet);

if (dataSet.Tables.Count == 0)
// Handling
else if (dataSet.Tables.Count > 1)
// Handling
else
return dataSet.Tables[0];
}
}
catch (OracleException ex)
{
// Handling
}
catch (Exception ex)
{
// Handling
}
The frumious Bandersnatch
zatic
Profile Blog Joined September 2007
Zurich15366 Posts
November 28 2012 13:38 GMT
#4078
On November 22 2012 20:56 zatic wrote:
Thanks guys. "Change" should be enough, I won't need to keep entered but unfinished text elements before they change focus.

AmericanUmlaut: Yeah what I am afraid is that their UI uses tons of Javascript already and might do some of the changes to form elements programmatically. I'll know more when I am onsite.

The change() thing wasn't really feasible because the form already had all sorts of event handlers on every element that interfered with what I was trying to do.

I ended up extending the JS function that submits the form to include the timestamp I needed.
+ Show Spoiler +

var zsendSubmit = sendSubmit;
(function () {
sendSubmit = function () {
$("input[name='lastconfigchange']").val($.now());
zsendSubmit();
}
})();


Reminded me how much fun coding is and how much fun Javascript is. Also how much unfun MSIE is
ModeratorI know Teamliquid is known as a massive building
AmericanUmlaut
Profile Blog Joined November 2010
Germany2596 Posts
November 28 2012 16:24 GMT
#4079
On November 28 2012 22:38 zatic wrote:
Show nested quote +
On November 22 2012 20:56 zatic wrote:
Thanks guys. "Change" should be enough, I won't need to keep entered but unfinished text elements before they change focus.

AmericanUmlaut: Yeah what I am afraid is that their UI uses tons of Javascript already and might do some of the changes to form elements programmatically. I'll know more when I am onsite.

The change() thing wasn't really feasible because the form already had all sorts of event handlers on every element that interfered with what I was trying to do.

I ended up extending the JS function that submits the form to include the timestamp I needed.
+ Show Spoiler +

var zsendSubmit = sendSubmit;
(function () {
sendSubmit = function () {
$("input[name='lastconfigchange']").val($.now());
zsendSubmit();
}
})();


Reminded me how much fun coding is and how much fun Javascript is. Also how much unfun MSIE is

Yeah, when I teach my daughter to code, I'm going to tell her bedtime stories about IE6. I'm so glad I'm working on projects that don't have to support IE<9 any more.

I'm curious why you wrapped the redefinition of sendSubmit in a self-executing anonymous function? As far as I can tell, there's no difference between doing that and just putting the same block of code into global namespace. You don't have any variables in there that will expire when the context created by the function dies. Did you intend to declare zsendSubmit inside the function?
The frumious Bandersnatch
tofucake
Profile Blog Joined October 2009
Hyrule19228 Posts
November 28 2012 19:27 GMT
#4080
it's not cool to be giving nightmares you a young child.
Liquipediaasante sana squash banana
Prev 1 202 203 204 205 206 1032 Next
Please log in or register to reply.
Live Events Refresh
PiGosaur Cup
00:00
#90
CranKy Ducklings198
davetesta61
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
WinterStarcraft599
Nina 141
RuFF_SC2 141
FoxeR 67
StarCraft: Brood War
Rain 4024
GuemChi 2802
NaDa 51
Counter-Strike
summit1g9413
tarik_tv4055
taco 284
minikerr30
Super Smash Bros
hungrybox559
Other Games
C9.Mang0407
ViBE250
Maynarde157
XaKoH 123
CosmosSc2 17
Organizations
Other Games
gamesdonequick2497
StarCraft: Brood War
lovetv 19
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 15 non-featured ]
StarCraft 2
• EnkiAlexander 65
• CranKy Ducklings SOOP41
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Scarra2740
• Lourlo1051
• Stunt245
Upcoming Events
The PondCast
6h 59m
Kung Fu Cup
7h 59m
Replay Cast
1d 5h
CrankTV Team League
1d 7h
Replay Cast
2 days
CrankTV Team League
2 days
Replay Cast
2 days
RSL Revival
3 days
Clem vs Lambo
Scarlett vs Cure
CranKy Ducklings
3 days
IPSL
3 days
Dragon vs Hawk
[ Show More ]
RSL Revival
4 days
Classic vs Trap
herO vs SHIN
Sparkling Tuna Cup
4 days
IPSL
4 days
Bonyth vs Ret
WardiTV Weekly
5 days
Monday Night Weeklies
5 days
PiGosaur Cup
6 days
Liquipedia Results

Completed

YSL S3
HSC XXIX
Eternal Conflict S2 E2

Ongoing

IPSL Spring 2026
Acropolis #4
CSL 2026 Summer (S21)
RSL Revival: Season 6
CranK Gathers Season 4: BW vs SC2 Team League
SCTL 2026 Spring
Stake Ranked Episode 3
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
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.