• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 00:21
CET 06:21
KST 14:21
  • 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 Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12
Community News
Weekly Cups (Jan 5-11): Clem wins big offline, Trigger upsets4$21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7)15Weekly Cups (Dec 29-Jan 4): Protoss rolls, 2v2 returns7[BSL21] Non-Korean Championship - Starts Jan 103SC2 All-Star Invitational: Jan 17-1833
StarCraft 2
General
SC2 All-Star Invitational: Jan 17-18 Stellar Fest "01" Jersey Charity Auction Weekly Cups (Jan 5-11): Clem wins big offline, Trigger upsets When will we find out if there are more tournament SC2 Spotted on the EWC 2026 list?
Tourneys
OSC Season 13 World Championship SC2 AI Tournament 2026 Sparkling Tuna Cup - Weekly Open Tournament $21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7) $25,000 Streamerzone StarCraft Pro Series announced
Strategy
Simple Questions Simple Answers
Custom Maps
Map Editor closed ?
External Content
Mutation # 508 Violent Night Mutation # 507 Well Trained Mutation # 506 Warp Zone Mutation # 505 Rise From Ashes
Brood War
General
[ASL21] Potential Map Candidates BW General Discussion BGH Auto Balance -> http://bghmmr.eu/ A cwal.gg Extension - Easily keep track of anyone Potential ASL qualifier breakthroughs?
Tourneys
Small VOD Thread 2.0 [Megathread] Daily Proleagues [BSL21] Grand Finals - Sunday 21:00 CET [BSL21] Non-Korean Championship - Starts Jan 10
Strategy
Simple Questions, Simple Answers Game Theory for Starcraft Current Meta [G] How to get started on ladder as a new Z player
Other Games
General Games
Awesome Games Done Quick 2026! Beyond All Reason Nintendo Switch Thread Mechabellum Stormgate/Frost Giant Megathread
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
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine European Politico-economics QA Mega-thread Trading/Investing Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread
Sports
2024 - 2026 Football Thread
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
My 2025 Magic: The Gathering…
DARKING
Physical Exercise (HIIT) Bef…
TrAiDoS
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
James Bond movies ranking - pa…
Topin
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1258 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
Hyrule19188 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 States17274 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
Germany2589 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
Zurich15359 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
Germany2589 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
Hyrule19188 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
Next event in 6h 39m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
WinterStarcraft457
RuFF_SC2 193
Nina 67
StarCraft: Brood War
Noble 250
Shine 90
Shuttle 81
ZergMaN 56
soO 55
Hm[arnc] 12
Bale 10
Icarus 9
Dota 2
monkeys_forever367
NeuroSwarm112
League of Legends
JimRising 878
C9.Mang0618
Other Games
summit1g6451
hungrybox333
ViBE53
minikerr32
Liquid`Ken6
Organizations
Other Games
gamesdonequick2656
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• practicex 40
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• RayReign 61
• Diggity3
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo1007
• Stunt392
Other Games
• Scarra1280
Upcoming Events
OSC
6h 39m
SKillous vs ArT
ArT vs Babymarine
NightMare vs TriGGeR
YoungYakov vs TBD
All-Star Invitational
20h 54m
INnoVation vs soO
Serral vs herO
Cure vs Solar
sOs vs Scarlett
Classic vs Clem
Reynor vs Maru
uThermal 2v2 Circuit
1d 6h
AI Arena Tournament
1d 14h
All-Star Invitational
1d 20h
MMA vs DongRaeGu
Rogue vs Oliveira
Sparkling Tuna Cup
2 days
OSC
2 days
Replay Cast
3 days
Wardi Open
3 days
Monday Night Weeklies
3 days
[ Show More ]
The PondCast
5 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-01-14
Big Gabe Cup #3
NA Kuram Kup

Ongoing

C-Race Season 1
IPSL Winter 2025-26
BSL 21 Non-Korean Championship
CSL 2025 WINTER (S19)
Escore Tournament S1: W4
OSC Championship Season 13
Underdog Cup #3
BLAST Bounty Winter Qual
eXTREMESLAND 2025
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025

Upcoming

Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Rongyi Cup S3
SC2 All-Star Inv. 2025
Nations Cup 2026
BLAST Open Spring 2026
ESL Pro League Season 23
ESL Pro League Season 23
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 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.