« first day (451 days earlier)      last day (3583 days later) » 

11:02 AM
0
Q: About Epub reader

TS SInghcan any one give me a program where i can just pass my location for .epub file and it should then open the epub boook. Thus can anyone help me in reading .epub books in simplest way , i tried many resource, it not helpful. Please Help ASAP

 
Wow, just wow
0
Q: About Epub reader

TS SInghcan any one give me a program where i can just pass my location for .epub file and it should then open the epub boook. Thus can anyone help me in reading .epub books in simplest way , i tried many resource, it not helpful. Please Help ASAP

Kill it with fire! Fast!
 
@skiwi I'm tempted to answer with "No."
 
@MadaraUchiha Better don't, it gets harder to kill then :( I can see why anyone would want to do so though!
 
11:27 AM
I wouldn't mind a database monkey now...
Sets are useless? If they can only contain strings
SELECT (1001, 1003) IN (1001, 1003, 1005) Is there any way to make this return true?
(Set-in-set)
 
I think you gravely misunderstood, what SELECT is...
 
I know it is in the concept of normal table-wide selects
But I'm unsure how to add any set logic into MySQL
(Or MariaDB in this case)
 
after select there come columns...
then usually there's a from...
and then we can talk about where...
 
So means there is no notation for a "set"?
 
which again allows in...
 
11:38 AM
First problem is that a SET needs predefined values, and I do not have those
I know how to normalize it in the database schema
But I also take a (Java List) as input in a stored procedure
 
I figure what you are looking for is "WHEN"
 
Does that keyword exist?
 
Simple CASE expression:
CASE input_expression
     WHEN when_expression THEN result_expression [ ...n ]
     [ ELSE else_result_expression ]
END
 
Ah that one
I should create a fiddle for reference
 
might be nice... gotta fix my gui-tests-branch that has some old model though,...
or rather...
everything sucks..
TODO:
- Documentation
- Fixing GUI-Tests
- Fixing New half-baked functionality
- Finish the website I work on
- Write up a Final Project
DUE: yesterday
and starcraft-watching colleagues are being helpful...
 
11:47 AM
Here's the fiddle
They have nothing to do?
 
no clue, it's gotten silent.
 
zzz
 
can one organization id be in multiple templates?
@Pimgd RIIIIING
 
AHHH
WHAT
STOP RINGING
flails wildly
 
Ring ring ring ring ring ring ring... Banana phone.
 
11:52 AM
doo de doo doo doo
 
Yep
 
no, stop, on GL-Chat we had that Song thing just a second ago..
 
actually I think it's doo doo de doo doo doo
yeahh...
 
@skiwi so you want to return templates.filter(t -> t.getOrganizations().containsAll(X)); ?
 
but it could be "doop" instead
 
11:54 AM
@Vogel612 I want to returning a set of all template ids for which X is a subset of the organizations that belong to that template
 
that lambda doesn't fit, eh?
 
No clue honestly, can't use it either way :P
It might actually fit
give or take some notations/coercing
 
@skiwi why not something along the lines of: SELECT templateId, organizationId FROM template_organizations WHERE organizationId IN (1003, 1005);?
 
It does it differently, not following my logic
I also came up with that solution earlier, but I'm unsure if it really is what I want it to have
Ah, found it
Here: sqlfiddle.com/#!2/4b411f/9 This also returns, but it shouldn't return anything
New fiddle with more explanation: sqlfiddle.com/#!2/4b411f/10
Where is @Phrancis when you need him!
 
dammit, the In is not checking ContainsAll, but ContainsAny#
 
12:02 PM
That is because the query does not really do what you think hope it does
If it would just support sets
 
then stuff would be easy, yea..
 
0
Q: Is this an efficient implementation of KMP string matching algorithm?

WannaBeCoderdef Calc_pmt(test): ar=[] for i in range(0,len(test)): part=test[:i+1] max=0; for j in range(0,len(part)): one=part[:j] # prefix two=part[-j:] # suffix if one==two: if len(one)>max: #find the highest length match max...

 
SELECT DISTINCT templateId FROM template_organizations WHERE organizationId CONTAINSALL (1003, 1005);
 
You're still looking at it from a per-row perspective
Though CONTAINSALL might be interesting
Except, it's not a function
Other issue is that I somehow need to pass a list of integers to the stored procedure, but it seems to want to have the possible values defined upfront
 
yay I found another bug
 
12:20 PM
Decided to try SO
0
Q: Check if a set of integers is a subset of another set of integers

skiwiUsing MariaDB 5.5, which at least covers all features available in MySQL 5.5, how can I find out if a set of integers is a subset of another subset of integers? In other programming (non-database) languages, one does (for example Java) Set<Integer> innerSet = new HashSet<>(Arrays.asList(1001, 1...

 
Ehh
What about a join?
On having the same value?
so SELECT COUNT(tableA.column) as a, COUNT(tableB.column) as b FROM tableA LEFT JOIN tableB on tableA.column = tableB.column
maybe distinct count
then all you're left with is comparing
hmmh
SELECT (COUNT(tableA.column) == COUNT(tableB.column)) maybe
@skiwi ping
I don't know enough about mariadb to be sure I'm not embarassing myself with things being impossible but that seems like an approach I'd try
 
MariaDB uses a superset of the features of MySQL, so go ahead
 
I've spent too much time with MSSQL
and I don't have a database handy
 
I get what you mean for a bit
 
SELECT (COUNT(tableA.column) = COUNT(tableB.column)) FROM tableA LEFT JOIN tableB ON tableA.column = tableB.column
I'd try that
Posted it as an answer
 
12:32 PM
I could probably take a string as input of the stored procedure and then build up a temp table from that
 
Maybe the SO people will tell you why my approach is bad
or they'll tell you it's good and then I'll get SO rep
either way you win
 
That AlmaDo seems to be someone who thinks he is always right
If a temp table is what I need to use, then it must be what I'll use
 
yay the downvote got removed
can you do a select from a numerical set? I forgot
like SELECT * FROM (10,20,30) as A
 
Hmm I'll test
 
Ah
 
12:39 PM
nope
 
You can do a FROM from a Sub select
Getting really nasty now maybe
SELECT * FROM (SELECT 10 as A UNION SELECT 20 UNION SELECT 30)
=D
 
I'd like some explanation on your code though, I'm not going to copy it 1:1
 
ja ja ja
I have this almost
 
I don't get why a simple operation needs to be so complicated
 
SELECT (COUNT(tableA.a) = COUNT(tableB.b)) FROM (SELECT 10 as a
UNION
SELECT 20) as tableA LEFT JOIN (SELECT 10 as b UNION SELECT 20 UNION SELECT 30) as tableB ON tableA.a = tableB.b
updated my answer
 
12:45 PM
That's unfortunately using a static list/set of elements, whereas it should be dynamic (can be any number)
 
gah
If only I had someway of getting the column name
nope that don't work either
 
Yes, I got it!
 
?
post it as a self answer because now I'm interested
 
Holy mother of SQL
DROP TEMPORARY TABLE inner_set;
DROP TEMPORARY TABLE outer_set;

CREATE TEMPORARY TABLE inner_set
(value INT(11) NOT NULL, INDEX(value));
CREATE TEMPORARY TABLE outer_set
(value INT(11) NOT NULL, INDEX(value));

INSERT INTO inner_set (value) VALUES (1001), (1003);
INSERT INTO outer_set (value) VALUES (1001), (1003), (1005);

SELECT
  CASE
    WHEN COUNT(*) > 0 THEN 0
    ELSE 1
  END AS is_subset_of
FROM inner_set
LEFT JOIN outer_set ON inner_set.value = outer_set.value
WHERE outer_set.value  IS NULL
 
That's a bit boring
You're creating temporary tables and all
 
12:55 PM
I don't know how else to do it
But the only way to evaluate something, is to input it as varchar I am afraid
which is still ugly
to make a stored procedure
 
what's the difference between VALUES( value ), (value) and SELECT value as x UNION SELECT value UNION SELECT value
 
(@Phrancis will so kill me for this query)
@Pimgd I can dynamically add X number of rows, where's you cannot do that with union
 
Spam more union selects
it's the new comma
that's what I mean
you either have a comma or you have a couple characters
 
You cannot dynamically do that as far as I know
 
I don't see the difference
well something has to build the query?
I'm just mildly disappointed you ended up using temporary tables
 
12:59 PM
It's gotta be a simple stored procedure you call
I don't think you can build a SQL query in SQL
 
sure you can
but that would be a stored procedure too
in that event yours is better
 
Now i'll need to figure out how to insert '1001, 1003', as two values
I can do some MySQL, but have never touched this advanced stuff
Which, seeing it's SQL, is neither going to be easy
 
Hey, I wrote an SQL batcher
that's a whole new brand of not fun
 
Please tell me that I can at least count the number of occurrences of a string in a string
 
and the answer is....
it seems not, but
 
1:08 PM
23
A: Count the number of occurences of a string in a VARCHAR field?

YannisThis should do the trick: SELECT title, description, ROUND ( ( LENGTH(description) - LENGTH( REPLACE ( description, "value", "") ) ) / LENGTH("value") ) AS count FROM <table>

Hell, screw MySQL and databases!
 
you can do a LENGTH(original) - (LENGTH(
hahaha
I KNEW IT
someone else had the same answer ages ago
still, nice to be able to figure those things out myself without having to google
 
meh.
 
0
A: Optimizing a function with nested loops and if condition

ShreeI cant Add the comments :( As I have recently joined this site. SO I have to ask queries/Details as an answer Could you please let us know the sample data contained in tileCoords ? is it a instance variable initialized somewhere ? Also please provide sample input Data and output that you are e...

new people!
I like this guy because he already wrote code with tests for another question
even if it is uh
questionable quality
but a lot of effort - I don't think I have ever seen a SE answer with UNITTESTS supplied
 
@ckuhn203 anytime
monking monking
 
1:29 PM
Is there no way in MySQL to store a query, thus instead of a Stored Function, you can return a result set?
@Malachi Monking, the one with weird avatar
 
Monking all.
 
Monking @rolfl
This is confusing
In the description of a stored procedure, it says that it does not return a result, yet you can return a select result
Contrary to a function, which always returns a result
 
1:45 PM
Greetings, Programs.
 
@Donald.McLean Greetings, User.
 
Greetins, @Lonald.DcMean
 
0
Q: Filtering data stored using classes via user-called function the proper way?

BernardI'm currently working on an API package. Basically what it does is scrapes team data and stores them in list of Team objects. The team object contains data such as Team.name,rank, country etc. If a user wants to filter that list to find something in it, I have this really messy and ugly (but wor...

 
Monking @all.
Thanks again for helping me out last night @Donald.McLean. Much appreciated.
 
@skiwi That's the problem with overloading words, it confuses things. In theory, a function is a map a -> b, where b is the result. A procedure is just a command "do something" and does not produce a result, but in a DBMS, many things produce a "result set" which, though it has that word "result" in it, is not related.
@ckuhn203 Happy to be able to help.
 
1:50 PM
@skiwi Check
it
out
 
ouuut
bah
 
hey I am trying to make my avatar big...lol
 
@Malachi
then you should use:
shift
enter.
 
Or you post something like an answer or a question
0
A: Filtering data stored using classes via user-called function the proper way?

Pimgd if name: if name.lower() == team.name.lower(): all_args.append(True) else: all_args.append(False) if country: if country.lower() == team.country.lower(): all_args.append(True) else: ...

Did I get it right? I don't know python.
 
or just post your own profile:
 
1:52 PM
whoa you get an even bigger pictar that way
 
Perhaps, if you became the Supreme Dictator of Earth, you could force SE to give you a really big pictar.
 
The PR blowback would be huge
 
Any reason why this part of a stored procedure (included in delimiters) would throw an error on the declare?
CREATE TEMPORARY TABLE outer_set
(value INT(11) NOT NULL, INDEX(value));

DECLARE i INT DEFAULT 1;
 
because I remember sql using
@variables
 
like this
2
A: Is it bad practice to increment more than one variable in a for loop declaration?

MalachiUPDATE Matt made a really good point, but I still believe that the two following code blocks will sit well with what Matt said in his answer. count is incremented every iteration of the inside for loop so it is changing where it should be changed in both blocks of code. you should not incremen...

or
 
1:55 PM
@skiwi yeah it has to be DECLARE @i
 
@Pimgd Then you declare them for the whole session, not just for the stored procedure
 
Interesting. @Malachi, being from South Dakota, are you familiar with the musical group Rockapella?
 
@Donald.McLean the name sounds familiar
 
@skiwi - no need for the comma
 
oh then I don't know but seems rofllflffl has the answer
oh shi your sql query is gonna get bazookad
 
1:57 PM
@rolfl What comma where?
 
@skiwi anyway my point with all the trying to get my avatar bigger, is that my avatar is not weird! it's my bike
lol
 
Monking!
 
@Malachi It's not the same as yesterday, so it's weird
Monking @Phrancis, my savior?!
 
I suspect that this SQL does not work (IF–ELSE and BEGIN TRANSACTION–COMMIT don't nest properly):
0
Q: Batch of SQL statements in a single query

ChathurangaI'm using the following query for multiple transactions. This is the scenario. Generate Salary (this is not in the scope of the query) I have employee attendance in Attendance table. Then the salary is calculate from the attendance by using a stored procedure and resulting figures will be displ...

 
@Malachi They are most famous for doing the music for the kids TV game show "Where in the World Is Carmen Sandiego?" On one of their albums they have a song called "Capital" that lists 49 of the 50 US state capitals. Pierre being the only one that was left out.
 
1:59 PM
@Donald.McLean lol that is interesting.
 
@skiwi I don't think you're supposed to declare the index within CREATE TABLE try to CREATE INDEX in a separate statement.
 
@Malachi To make up for it, their "Where In The World Is Carmen Sandiego?" album contains a clip in which the then mayor of Pierre called the Rockapella answering machine and left a message complaining about the omission and extolling the virtues of Pierre.
 
0
Q: Speeding up prime factorization

yaskI have written the following code for returning the list of prime numbers , any speed enhancing suggestions? import math def is_prime(num): for n in range(2,math.floor(math.sqrt(num))): if num%n==0: return False return True def find_prime_factors(num): p...

 
24 hours ago, by rolfl
Right, I am officially changing my mental-classification of @Malachi's icon, from 'ogre' to 'hog'.
 
@Malachi I know, I was there ^^
 
2:02 PM
@Donald.McLean nice! I didn't know that either. but in my defense I didn't watch where in the world is Carmen Sandiego after I moved to South Dakota
and now I work in Pierre and call it my home for the time being
@skiwi lol, that is why I changed it, less mental strain on @rolfl
 
What?! You must do your DECLAREs before any other statements...
 
oh I do Declare
 
@Malachi that's one of the more hi-res gravatars I've seen actually
still looks fine at 1024 - i.sstatic.net/sOyRM.jpg?s=1024
 
@skiwi never mind
 
> Schema Creation Failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS (SELECT * FROM SalaryTrans WHERE employee_id=@employee_id and refe' at line 1: @200_success you are right
 
2:17 PM
... Wat, I've found code that's really hard to poke holes in
3
Q: Object pool implementation

AlexBelow is my implementation of a pool. It is based on a hash table and supports using strong, soft or weak references to store objects. At the start there is a builder class to configure and create instances, followed by a subclass of Pool which allows multiple reference types to be used. Towards ...

how did this happen
where did this guy come from
 
That's quite advanced Java indeed
 
more than half of my comments are nitpicks and personal preferences
like the order of methods
 
@200_success I just realized I had fiddle set up to MySQL so nvm. But I do think you're right, hard to say without seeing the whole procedure in context
 
2:36 PM
0
Q: Selecting template using organization ids

skiwiThis is my first SQL post over here, and in fact, I have more or less the experience of a regular SQL programmer, except that the task at hand this time was way harder than normal. I am expecting, hoping and almost demanding a better version of my code, because my version is really bad, but I do...

It works and is released into the wild!
 
1
Q: Selecting template from database using organization ids

skiwiThis is my first SQL post over here, and in fact, I have more or less the experience of a regular SQL programmer, except that the task at hand this time was way harder than normal. I am expecting, hoping and almost demanding a better version of my code, because my version is really bad, but I do...

 
I tried answering that guy's question but dang
He could teach me things
 
@DaggNabbit I am a web guy, I know what I am doing.... :) (not really I am just lucky a lot)
I took a screenshot of my background because the original was over 2MB
it is now around 1000KB I think
 
and also JPG I think
 
2:54 PM
@Pimgd yes good compression helps
lol
 
eh
PNG ftw
especially with compression algorithms
 
3:14 PM
0
Q: export data to excel but I am getting Java out of memory message in excel

SonnyHello all I have a new issue with this program. I have removed the autoSizeColumn and it reaches the point to where it is about to write to the excel workbooks. I am now getting a java.lang.OutOfMemoryError. Here is the complete stack trace of the error: exception javax.servlet.ServletException:...

 
Jamal closing faster than Cpt. can post ;)
 
And I've found many off-topic questions from hours ago. They just keep clogging up the main page.
 
0
Q: Search suggestion box with JQuery and AJAX, performance concerns?

DribbleUIvar searchUser = function(searchQuery){ var request = $.ajax({ url:"search.php", type: "POST", data: { search:searchQuery}, success: function(reply){ $("#search-box").css("display", "block"); $("#search-box").html(reply); } }...

 
Anyone feel like taking a crack at this C# zombie? The OP hasn't created an account all this time, but he's still active on SO.
 
3:37 PM
Zombie Down
0
A: Loading Data Warehouse with Dynamic SQL

MalachiFirst thing that I am going to mention is that in your first Query you have this INSERT tickets ( group_id, some_foreign_key, some_timestamp ) VALUES (1,CAST((RAND() * 100) AS INT),DATEADD(DD, CAST((RAND() * 100) AS INT), GETDATE())), (2,C...

 
0
Q: Objective-C code clean up

erikI am tasked with cleaning up someone else Objective-C code, and will admit, it is not my language of choice. I am not sure if this is a valid question but was hoping someone could double check my attempt to clean up a method written by someone else, and make sure i didn't miss some minor detail o...

0
Q: If it is a Palindrome string

kyleI have written two code's to find if a given string is Palindrome. public static bool FirstMethod(string str) { int i = 0; int j = str.Length - 1; while (i<j) { if (str[i] != str[j]) return false; i++; ...

 
@CaptainObvious that's a a vs b
the obj-c looks like one, too
and @Jamal the zombie is quite heavy, and my company didn't decide to get me VS on my new Laptop, soo....
 
Malachi just got it.
 
@Jamal BAM!
0
A: Wrapper class for the Rotten Tomatoes API

MalachiThis looks really silly to me try { using (var response = (HttpWebResponse)request.GetResponse()) { var serializer = new DataContractJsonSerializer(typeof(MoviesDataContract)); return (MoviesDataContract)serializer.ReadObject(response.GetResponseStream()); ...

15 minutes until team meeting and I still haven't figured out my VB.NET radio Button issue
 
Perhaps we can notify the OP on SO that his question on CR has been answered, and that he should create an account.
 
3:50 PM
@Jamal how can we do that?
 
Perhaps by commenting on any of his posts.
That's what I did once.
 
I am thinking that it is not a good way to go about it.... I seem to think it will get flagged right away....
 
I suppose I can ask other mods for advice.
 
0
Q: Need help reviewing my assembly to C pseudocode

marchonThis is part of an assignment. I believe it forms a while loop which looks like my pseudocode below, but I'm not sure I'm interpreting it completely correctly. Would it be possible to review this against my pseudocode to see if there is anything that I have missed? I have also commented the code ...

 
People are still putting "help" in titles, even though it's filtered. These bad titles are just ticking me off.
@Malachi I'll superping the user. I haven't done this before for another site, so I hope I get it right.
 
4:05 PM
@Jamal How can they if it's blocked?
 
@bflemi3 Hello! I understand this is unexpected, but one of your older migrated questions has just been reviewed. Please create an account here as well.
@skiwi I have no idea.
 
0
Q: Finding factors of a number

user49487I wanted to find the factors of any number in python and I read somewhere that this is one of the best ways to do so, but I have no clue what it does. def factors(n): return set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))) I'm a beginner and I do...

 
@Jamal he hasn't been active for an hour so it might be a little bit before he responds
 
That's fine. He should still get the notification. Hopefully I won't have to do this too often.
 
if we can do it for old questions and get people to come back to CR......
 
4:15 PM
I was told that if the OP never followed the question, then it's not worth the effort.
 
@200_success I only say gimmetehcodez because of the final question in the post
> Also, is there any other better method than this?
 
4:32 PM
0
Q: Avoid Function triggered too too frequently

MyNameIsAlvinSome function trigger is fire too much frequently, If the function is big, it will cause slow computer lagging. In my example $(window).resize() I want the function only fire after the user done his resize, instead of fire every single px you did resize. So I make this 'Function Buffer'. func...

 
4:45 PM
@Malachi There's nothing wrong with "Is there any other better method than this?", except the fact that it's a routine question that everyone asks. In fact, simply posting a question is implicitly asking for suggestions for improvements. There are two working implementations — what more could we demand of the author?
 
1
Q: Temperature conversion table

11684This is another solution for this challenge. Problem statement: In this challenge, write a program that takes in three arguments, a start temperature (in Celsius), an end temperature (in Celsius) and a step size. Print out a table that goes from the start temperature to the end tempera...

 
@200_success I keep forgetting that we are allowing Comparative Reviews as well. at second (or third) thought it does look like a very valid question.
 
I managed to write a review. (I went back and updated it.)
The problem is comparative reviews draw crap answers.
 
I just now noticed that you can also star rooms!
 
@ckuhn203 I saw that. you already have an up vote from me
@skiwi favorite rooms. then later you can enter all your favorite rooms as well.
@ckuhn203 have you seen this post? codereview.stackexchange.com/a/58397/18427
 
4:57 PM
I'm considering writing an answer to that meta post. I'm not sure that A vs. B should be on topic. Mostly because it seems to create a lot of low quality answers.
 
@ckuhn203 I've noticed that too. The A vs B questions seem to be pretty low quality too afaict.
like someone just copypastes two chunks of code, claims they wrote them, and asks which is better
 
hello
 
0
Q: I think I should use JOIN but I did this instead

PquchI have two tables. One table is called domains and it contains the "rep" column which is an integer. It is related to the column "id" in the reps table. The reps table also houses the First and Last names of the rep assigned to a particular domain and when I query the database to show all of the ...

 
@Malachi I hadn't seen your answer, but I was hoping to take a look at the code later.
 
hey @janos
 
5:00 PM
Work's been killer today.
 
@ckuhn203 I barely touched that code...
I need to go through a bunch of VB that parses an XML file..... SIGH
 
hey @skiwi
 
anyway, TFL
 
It's ok. To quote @jt0dd, "Crawlers are easier to kill."
2
 
I agree with @Malachi. The first version is actually easier to read to my eyes. However, my original background was in C/C++ so maybe that's why. The information density is higher. #2 looks like some Java Enterprise Architect wrote it. (not a bad thing necessarily) — dss539 3 mins ago
 
5:04 PM
any javascript wizards around?
 
maybe
 
@DaggNabbit it's about this question:
6
Q: jQuery Upvote, a simple Stack Exchange style voting plugin

janosI'm not very good at JavaScript, so it would be great if somebody could review my jQuery Upvote plugin, and point out mistakes, bad practices, or anything suspicious. The repository is on GitHub. Here's a live demo, and qunit tests, if you're interested, but I'm not asking for a review of those....

the answers helped, but not with using this the right way
 
hmm let me take a look
 
thanks!
 
function init(options) {
    return this.each(function() {
what do you expect this to be there?
you call init later on like this: return methods.init.apply(this, arguments);
so now we need to look and see what this is there...
ok so this is $.fn
i think the linter gets confused the same way a human reading the code would
 
5:09 PM
// sweating here...
 
i would not use this, just pass in $.fn a plain argument
that way you don't need apply
function init(jQueryFn, options) {
    return jQueryFn.each(function() {
...
methods.init(this, method);
lol there we go
 
trying that, hang on...
some unit tests are failing...
looking for why.....
 
you use this in a lot more places
 
yup
 
try to avoid this whenever reasonable
I'm not a big fan of var that = this either... use something descriptive instead of that
 
5:13 PM
in my actual code I changed that to $this
 
Are you Hungarian?
Not a big fan of Hungarian notation either ;)
 
haha
I'm not a fan of that at all
 
$foo is basically Hungarian notation... "this is a jQuery object containing a foo."
$this to me is a total disaster, "this is a jQuery object containing a this"
 
I didn't understand what $ really is
 
it's a "wart"
 
5:18 PM
@janos its cash-money
 
$this is super common in code that makes heavy use of jQuery and not many people will bitch about it so you can do it and get away with it
I still think it smells though
 
Oh No! It's Scorpy!
Hi @bazola!
 
I agree, I'd like to improve that
@DaggNabbit with what you told so far it's already a better answer than the others
so I suggest you post it so it can start getting votes
// while I'm still struggling to figure out the right places to change this ...
I'm starting to get the hang of this
 
15 more answers and 46 more upvotes for , and the goldie will be mine.
 
@janos tbh I personally would not use jQuery for this so my answer would be a total rewrite
for example document.getElementsByClassName() returns an HTMLCollection which is live (updates as the DOM updates) so there would not be much reason to store all your class name strings in variables, you could simply store a reference to that live collection
so I would prefer document.getElementsByClassName("foo") to $(".foo")
also because I think that it's much clearer what's going on when reading that
 
5:33 PM
@DaggNabbit all the stuff you're telling me would make a great answer already
 
hey @ckuhn203 how are ya?
 
gonna grab dinner now, will be back in an hour
/away
 
@bazola I'm doing good Harvey. You?
 
hehe Harvey huh? I'm doing pretty good I suppose
 
I always liked Harvey. I miss that show.
 
5:36 PM
I find the $ sigil to be very useful when writing code that uses jQuery. It helps distinguish between jQuery objects and raw DOM objects.
 
I used to have a Harvey avatar but I think this one is pure Scorpy suit :) I miss that show too
 
My fiance and I watched all of it on NetFllix last winter. Best date nights ever.
 
I've probably watched the whole thing through about five or six times now. I think it is literally the best science fiction show ever made. We are talking about Farscape in case anyone is wondering
 
1
Q: Detecting Two Intercepting Circles with editable x, y, and radius in JavaFX

John ConnerI was actually pretty proud of this, was a programming project that I came across in this book I'm working through. I only really had problems on figuring out the formula for detecting whether the two circles had intersecting paths. Let me know what y'all think, constructive criticism appreciated...

 
@200_success there could be cases where it's useful for that, but most of the cases I see people are only dealing with jQuery collections and never with plain DOM objects, so there's no need to make the distinction
also, you don't see people prefacing HTMLCollections with HC or NodeLists with NL, so why jQuery objects with $?
 
5:54 PM
In my experience, jQuery-using code does need to interface with non-jQuery variables.
191
Q: jQuery $(this) vs this

eventhoughI am currently working through this tutorial: Getting Started with jQuery For the two examples below: $("#orderedlist").find("li").each(function(i) { $(this).append(" BAM! " + i); }); $("#reset").click(function() { $("form").each(function() { this.reset(); }); }); Notice in the fi...

 
Monking @all
 
Should there be a tag?
2
Q: Verify assembly code implementation

marchonThis is part of an assignment. I believe it forms a while loop which looks like my pseudocode below, but I'm not sure I'm interpreting it completely correctly. Would it be possible to review this against my pseudocode to see if there is anything that I have missed? I have also commented the code ...

 
1008 rep until I am a 10 k user! if I max 5 days in a row I could be there in.... 5 days
 
0
Q: Trying to avoid a double full scan with aggregates in query

Michael McGriffI have a statistics query I'm trying to run against the below table: CREATE TABLE "*****"."RUN_D" ( "WHSE_CODE" CHAR(12 BYTE), "RUN_NUM" NUMBER(*,0), "SHEET_NUM" NUMBER(*,0), "SHEET_SEQ" NUMBER(*,0), "COUNT_DATE" DATE, "COUNTED" CHAR(1 BYTE), "ITEM_NUM" CHAR(30 BYTE), "BIN_CODE" CHAR(...

 
Thanks, Santa!
2
 

« first day (451 days earlier)      last day (3583 days later) »