• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 08:56
CEST 14:56
KST 21:56
  • 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
TL.net Map Contest #21: Voting3[ASL20] Ro4 Preview: Descent6Team TLMC #5: Winners Announced!3[ASL20] Ro8 Preview Pt2: Holding On9Maestros of the Game: Live Finals Preview (RO4)5
Community News
Weekly Cups (Oct 6-12): Four star herO65.0.15 Patch Balance Hotfix (2025-10-8)70Weekly Cups (Sept 29-Oct 5): MaxPax triples up3PartinG joins SteamerZone, returns to SC2 competition325.0.15 Balance Patch Notes (Live version)119
StarCraft 2
General
5.0.15 Patch Balance Hotfix (2025-10-8) The New Patch Killed Mech! TL.net Map Contest #21: Voting Weekly Cups (Oct 6-12): Four star herO PartinG joins SteamerZone, returns to SC2 competition
Tourneys
Master Swan Open (Global Bronze-Master 2) Tenacious Turtle Tussle WardiTV Mondays SC2's Safe House 2 - October 18 & 19 Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Custom Maps
External Content
Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment Mutation # 493 Quick Killers Mutation # 492 Get Out More
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ Brood War web app to calculate unit interactions BSL Season 21 Whose hotkey signature is this? Any rep analyzer that shows resources situation?
Tourneys
[ASL20] Semifinal B [ASL20] Semifinal A [Megathread] Daily Proleagues [ASL20] Ro8 Day 4
Strategy
Current Meta BW - ajfirecracker Strategy & Training Siegecraft - a new perspective TvZ Theorycraft - Improving on State of the Art
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread ZeroSpace Megathread Dawn of War IV Path of Exile
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
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
SPIRED by.ASL Mafia {211640} TL Mafia Community Thread
Community
General
Russo-Ukrainian War Thread Men's Fashion Thread Things Aren’t Peaceful in Palestine Sex and weight loss US Politics Mega-thread
Fan Clubs
The herO Fan Club! The Happy Fan Club!
Media & Entertainment
Anime Discussion Thread [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion MLB/Baseball 2023 NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
Inbreeding: Why Do We Do It…
Peanutsc
From Tilt to Ragequit:The Ps…
TrAiDoS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1220 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
Hyrule19135 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 States17254 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
Germany2578 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
Zurich15352 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
Germany2578 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
Hyrule19135 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
LiuLi Cup
11:00
46
Rogue vs herOLIVE!
Clem vs Classic
WardiTV849
RotterdaM417
Rex131
Liquipedia
Afreeca Starleague
10:00
Ro4 Match 2
Soma vs BisuLIVE!
Afreeca ASL 19533
sctven
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RotterdaM 417
Lowko341
Rex 131
ProTech87
StarCraft: Brood War
Calm 12474
Rain 6422
Flash 5790
Sea 5174
Jaedong 3742
BeSt 2385
Horang2 1231
Mini 1183
EffOrt 792
Larva 659
[ Show more ]
Pusan 641
actioN 500
ZerO 431
Stork 389
firebathero 324
Hyun 268
Light 229
Barracks 150
hero 109
PianO 107
Backho 68
JYJ63
ToSsGirL 61
ggaemo 59
Rush 57
Mong 56
Aegong 55
Sharp 37
NotJumperer 32
JulyZerg 32
soO 25
yabsab 18
Terrorterran 17
Sacsri 16
Bale 16
ajuk12(nOOB) 15
scan(afreeca) 12
Killer 11
Icarus 11
HiyA 10
Noble 10
ivOry 8
SilentControl 7
Hm[arnc] 7
Dota 2
qojqva2682
Dendi1243
Gorgc739
XaKoH 367
XcaliburYe330
BananaSlamJamma180
Counter-Strike
x6flipin426
edward38
Other Games
olofmeister1066
hiko450
B2W.Neo382
crisheroes332
Pyrionflax263
DeMusliM256
Liquid`LucifroN90
Fuzer 84
oskar67
ArmadaUGS62
Codebar2
Organizations
Counter-Strike
PGL8852
StarCraft: Brood War
UltimateBattle 347
lovetv 13
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 11 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos3069
Upcoming Events
OSC
1h 4m
OSC
5h 4m
MaxPax vs Gerald
Solar vs Krystianer
PAPI vs Lemon
Ryung vs Moja
Nice vs NightPhoenix
Cham vs TBD
MaNa vs TriGGeR
PiGosaur Monday
11h 4m
OSC
1d 10h
The PondCast
1d 21h
OSC
1d 23h
Wardi Open
2 days
CranKy Ducklings
3 days
Safe House 2
4 days
Sparkling Tuna Cup
4 days
[ Show More ]
Safe House 2
5 days
Liquipedia Results

Completed

Acropolis #4 - TS2
WardiTV TLMC #15
HCC Europe

Ongoing

BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
C-Race Season 1
IPSL Winter 2025-26
EC S1
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025

Upcoming

SC4ALL: Brood War
BSL Season 21
BSL 21 Team A
RSL Offline Finals
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
TLPD

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

Advertising | Privacy Policy | Terms Of Use | Contact Us

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