|
ultrafilter posted:Or course credit. Oooooooh that's spectacularly painful
|
# ? Jun 16, 2012 00:27 |
|
|
# ? Jun 8, 2024 13:47 |
|
Otto Skorzeny posted:Oooooooh that's spectacularly painful Sometimes you can get grants to hire interns, I assumed this is what he meant by "sponsored".
|
# ? Jun 16, 2012 04:07 |
|
Apologies if this is the wrong thread but I'm sure you guys will know: Is it actually possible to make money off Chrome/Firefox extensions through advertising or otherwise? All I can find from googling is that Google doesn't allow adsense in extensions. How about alternatives like adbrite? Sorry if I'm way off the mark, I'm only just starting to get my head around it all.
|
# ? Jun 17, 2012 11:38 |
|
Haha, no, guys, the kicker is that I am a liberal arts major who preferred to do history/political science over computer science. This is an internship with a worker's organization that I took to get contacts in the area (which is working spectacularly, by the way). So I'm not getting paid much more than 11/hr or so. Theoretically, however, I don't have to be doing this at all - they wanted a list of common ones. I just wanted them to be able to search them all, easily. Anyway, I'm working on installing SQLite tonight. We'll see how it goes. edit: I guess I meant trying to get it working with what I have so far. vvv Kafka Esq. fucked around with this message at 21:38 on Jun 17, 2012 |
# ? Jun 17, 2012 20:06 |
|
Kafka Esq. posted:Haha, no, guys, the kicker is that I am a liberal arts major who preferred to do history/political science over computer science. SQLite isn't really something you install. at least, not in the way you do databases like Postgres or MySQL. It's just a library that manipulates database files, so you don't install it per se - you install the library that provides your language with its functionality.
|
# ? Jun 17, 2012 20:50 |
|
Suppose you are creating a web application and you want users to be able to create accounts and choose usernames for them. You don't want to restrict the characters they can use without good reason, so you intend to allow any Unicode character unless there is a good reason not to allow it. What characters do you disallow, and how would you code a function to check whether a username is acceptable or not?
|
# ? Jun 17, 2012 22:26 |
Go read a bit about Unicode normalisation forms, it's very relevant for things that have to not just be displayed but also compared and searched against. Alternatively, have plain ASCII usernames and then display names in addition to that.
|
|
# ? Jun 17, 2012 22:30 |
|
Also Unicode Character Classes, to filter out such things as U+1F4A9 PILE OF POO.
|
# ? Jun 17, 2012 22:39 |
|
I want to learn some ASP/ASP .NET. What kind of webserver setup should I be using? I have a Windows server, but it's 2003 and I don't know if IIS 7.5 runs on it, or how setup should be done (is IIS versioning tied to the OS exactly?) Any quickstart tutorials to get off the ground?
|
# ? Jun 17, 2012 22:47 |
|
Biowarfare posted:I want to learn some ASP/ASP .NET. What kind of webserver setup should I be using? Windows. quote:(is IIS versioning tied to the OS exactly?) Yes. IIS 6, which is the version included with Windows 2003, can run ASP.NET 4.0 applications and any framework that works with that, so you're OK there. You'll need to handle URLs a little differently if you're using ASP.NET MVC because IIS 6 handles URL processing differently from 7, information on that is in the MVC guide. quote:Any quickstart tutorials to get off the ground? http://www.asp.net http://www.asp.net/mvc
|
# ? Jun 17, 2012 23:55 |
|
pseudorandom name posted:U+1F4A9 PILE OF POO. I laughed way too hard when I looked this up
|
# ? Jun 18, 2012 00:32 |
|
Otto Skorzeny posted:I laughed way too hard when I looked this up It's also included as one of iOS's emoji, but looks entirely too happy.
|
# ? Jun 18, 2012 00:35 |
|
I'm trying to create a simple text file parser for an iPhone app with no experience in Obj-C prior. I've managed to get as far as loading the file into a string and separating the string using delimiters, which creates a bunch of strings for each input, but I need to convert these strings into an array of usable integers. This is what I have so far: code:
Any ideas?
|
# ? Jun 18, 2012 00:44 |
|
Otto Skorzeny posted:I laughed way too hard when I looked this up U+1F3E9
|
# ? Jun 18, 2012 00:54 |
|
Objective-C code:
|
# ? Jun 18, 2012 01:30 |
|
Jehde posted:I'm trying to create a simple text file parser for an iPhone app with no experience in Obj-C prior. I've managed to get as far as loading the file into a string and separating the string using delimiters, which creates a bunch of strings for each input, but I need to convert these strings into an array of usable integers. To elaborate on Plorkyeran's post, the Cocoa collection classes can't hold C primitives (int, char, etc), they need to be boxed in an NSObject subclass (usually NSNumber). This also means if you later need to access the primitive value, you'll have to unbox it ([obj intValue], see NSNumber documentation). I would probably do something like this for your snippet: Objective-C code:
Fast enumeration (for-in) is almost always preferable to a regular old for-loop on a collection, unless you need the index or whatever. Also you may want to check out the dedicated Obj-C thread: http://forums.somethingawful.com/showthread.php?threadid=3400187 Carthag Tuek fucked around with this message at 01:50 on Jun 18, 2012 |
# ? Jun 18, 2012 01:47 |
|
Plorkyeran posted:
Ahhh alright, MutableArrays can only take objects and not primitive types. Thank you! EDIT: As for the capacity, the capacity will always be between 2-6, so I actually changed it to 2 to accomodate the auto-inflating, but it's not really too important, all the data gets changed into objects anyways. I tried posting a Quartz related question in the iPhone dev thread before but it was ignored, and seeing as this was just a basic Obj-C question I figured I'd have more luck here. Surely enough I did. Thanks again for the help Plorkyeran and Carthag! Jehde fucked around with this message at 02:15 on Jun 18, 2012 |
# ? Jun 18, 2012 01:57 |
|
Doctor w-rw-rw- posted:It's also included as one of iOS's emoji, but looks entirely too happy. The expression makes it look like an Ewok
|
# ? Jun 18, 2012 03:37 |
|
Doctor w-rw-rw- posted:It's also included as one of iOS's emoji, but looks entirely too happy. That isn't a coincidence, Google and Apple added ~700 emoji glyphs to Unicode 6.0.
|
# ? Jun 18, 2012 03:51 |
|
Jehde posted:I tried posting a Quartz related question in the iPhone dev thread before but it was ignored, and seeing as this was just a basic Obj-C question I figured I'd have more luck here. Surely enough I did. Thanks again for the help Plorkyeran and Carthag! As someone who ignored your question, I did so because it seemed to ask "how do I build this nontrivial app", which is a question I figure you should explore a bit more on your own. I meant to guide you down that path if no one responded for a day or two but I forgot, sorry.
|
# ? Jun 18, 2012 04:35 |
|
nielsm posted:Go read a bit about Unicode normalisation forms, it's very relevant for things that have to not just be displayed but also compared and searched against. pseudorandom name posted:Also Unicode Character Classes, to filter out such things as U+1F4A9 PILE OF POO. Thanks, I find learning about Unicode to be actually very interesting, but it tends to seem very complex. As far as I'm understanding it you would probably want to make sure the user name was in NFC and then check that all the I see that there is also the option to be more "aggressive" about normalizing Unicode text by using NFKC, but I'm not sure when you might do that. I guess maybe you would use it to compare strings, but you would not necessarily store a string in NFKC, since you lose information by doing so?
|
# ? Jun 18, 2012 05:24 |
|
Hammerite posted:Thanks, I find learning about Unicode to be actually very interesting, but it tends to seem very complex. As far as I'm understanding it you would probably want to make sure the user name was in NFC and then check that all the http://www.regular-expressions.info/unicode.html will probably help. You probably want L, M, Zs and P (or maybe a subset). Normalisation I would leave up to whatever library I'm using to compare strings. Which I would then moan about if it didn't work.
|
# ? Jun 18, 2012 10:32 |
|
Zombywuf posted:http://www.regular-expressions.info/unicode.html will probably help. You probably want L, M, Zs and P (or maybe a subset). Normalisation I would leave up to whatever library I'm using to compare strings. Which I would then moan about if it didn't work. Would you say it would be reasonable to restrict to L, M, N, P, Zs and possibly some of S (for special snowflakes who enjoy having, erm, snowflakes in their name) but to apply additional rules, e.g. - remove Zs characters appearing at the start and end of the name (doesn't make sense for names to start or end with whitespace) - disallow M characters from appearing at the start of the name - require a minimum number of non-M, non-Zs characters
|
# ? Jun 18, 2012 11:43 |
|
Biowarfare posted:I want to learn some ASP/ASP .NET. What kind of webserver setup should I be using? I have a Windows server, but it's 2003 and I don't know if IIS 7.5 runs on it, or how setup should be done (is IIS versioning tied to the OS exactly?) Any quickstart tutorials to get off the ground? Head to ASP.NET to get started. You want to download the Visual Web Developer Express. It'll have a web server you can test on. For deployment Windows Azure (Microsoft cloud hosting) currently has "free" accounts for low traffic websites if you want to show everything off down the road.
|
# ? Jun 18, 2012 13:19 |
|
Hammerite posted:Would you say it would be reasonable to restrict to L, M, N, P, Zs and possibly some of S (for special snowflakes who enjoy having, erm, snowflakes in their name) but to apply additional rules, e.g. Well, it all depends on how far you're willing to bend to special snowflakes. There are times I've been tempted to change my name to something that has no valid normal form in unicode as a big gently caress you to the world. Trimming (and normalising) whitespace and disallowing combining chars where they don't belong is reasonable, however if you're allowing symbols you might as well allow as much punctuation as they want. I guess it depends on what the use case is if you want allow Zalgo usernames.
|
# ? Jun 18, 2012 13:22 |
I would say that the most important property of a user name (login name) is that the user is able to re-enter it using any reasonable input method suitable for the language used for the user name. Pathological names, like ones that don't have a valid normal form, aren't really interesting. I would reject names that don't seem to make sense. However I would probably not use arbitrary Unicode strings for login names anyway. Let users log in with their email address as identification and then have a display name, then you won't have to put this kind of limits on the display name.
|
|
# ? Jun 18, 2012 13:43 |
|
The question I always ask myself when defining validation requirements is "what real problem am I trying to solve with this validation?". If there is a genuine (observed) problem with users entering junk data, or if certain data will break the system in some way then the validation should be designed to prevent this problem and only this problem. Otherwise what the benefit of preventing the user from entering " " or whatever as a name? If they're actively trying to enter junk data then they can enter "x" just as easily, and you may inadvertently blacklist some valid name. Edit: just noticed this is for user names, not person names, but I'll leave it here as the point remains true. If the person wants to log in as " " is there a valid business reason (eg the name may need to appear on a printed report) for stopping them from doing it? These are the only reasons I would consider preventing certain characters/patterns. Goat Bastard fucked around with this message at 14:10 on Jun 18, 2012 |
# ? Jun 18, 2012 14:02 |
|
nielsm posted:However I would probably not use arbitrary Unicode strings for login names anyway. Let users log in with their email address as identification. My email address has puny code in it
|
# ? Jun 18, 2012 16:43 |
|
nielsm posted:However I would probably not use arbitrary Unicode strings for login names anyway. Let users log in with their email address as identification and then have a display name, then you won't have to put this kind of limits on the display name. I would put limits on display names, rtl characters, byte order marks, abuse of combining characters and simply invalid codepoints will all come and bite you. Do I have to enter my email address in encoded word format or can I just enter it in unicode and have the computer work it out?
|
# ? Jun 18, 2012 17:02 |
|
tef posted:My email address has puny code in it We really need a new internet standard specifying a more limited grammar for valid email addresses so that we can finally explain the regexes to match valid emails in unironic tutorials!
|
# ? Jun 18, 2012 19:15 |
|
I have a question about Agile stuff. Some years back I was in an organization using XPlanner, and everything was estimated in man hours. As a team we all had a velocity for ourselves based on man hours. I wondered if there was some other way to represent the unit of work. It all does boil down to man hours, but team members with more experience in a subject will tend to do something quicker. This means I can't really estimate things purely on man hours if I don't know who will be doing the work. Is there some general concept of replacing man hours with something like a "man hour currency" that people go through at different rates? If so, what tools can handle that kind of thing?
|
# ? Jun 18, 2012 20:36 |
|
Rocko Bonaparte posted:I have a question about Agile stuff. Some years back I was in an organization using XPlanner, and everything was estimated in man hours. As a team we all had a velocity for ourselves based on man hours. I wondered if there was some other way to represent the unit of work. It all does boil down to man hours, but team members with more experience in a subject will tend to do something quicker. This means I can't really estimate things purely on man hours if I don't know who will be doing the work. Is there some general concept of replacing man hours with something like a "man hour currency" that people go through at different rates? If so, what tools can handle that kind of thing? Yes, most agile tools are built around "story points" which are exactly the generic thing you're talking about. Different developers can have different velocities and you can plan their iteration tasks accordingly. It's kind of the whole reasoning for the existence of "user story points" as a thing. Then you estimate everything in those and go from there.
|
# ? Jun 18, 2012 20:41 |
|
To me, it sounds like he wants to be able to provide generic estimates without knowing which people (or even which team) will be assigned the work - that's not going to be possible because the entire point of the backlog/allocation/scheduling part of the Agile system is that it is benchmarked against the output of individuals and teams. Team A might get a 16-pointer done in a week while team B might take a week and a half, depending on their velocity.
|
# ? Jun 18, 2012 20:54 |
|
I'm working on a school project to write a piece of software that takes input of an infix expression, converts it to postfix, and then evaluates the postfix expression. I haven't started working on postfix evaluation, which is apparently the easy part. I'm still wrestling with the algorithm my professor provided: 1. If the token is an operand, add it to the queue immediately 2. If the value is a close-parenthesis, pop all the stack elements and add them to the queue one by one until an open-parenthesis is found. 3. If the value is an operator, pop everything on the stack and add them to the queue one by one until you reach either an operator of lower precedence, or a right-associative operator of equal precedence (eg, the logical NOT is a right-associative operator). Add the found operator to the queue and push the original operator onto the stack. 4. At the end of the input, pop everything that remains on the stack and add to the queue one by one. He gives a sample input of 4+3*5, and says that it should be output as 4 3 5 * +. I don't see how he's getting that output based on the algorithm he's provided. You process the 4, it's an operand and goes in the queue. You process the +, which is an operator. You check the stack and see that the stack is empty; null is of lower precedence than the +, so you push + on the stack. You process the 3, it's an operand, and goes in the queue. You process the *, and it's an operator. So you pop everything on the stack, which means now you're looking at the +. The + is an operator of lower precedence than the *, so you cease popping items from the stack, enqueue the +, and push the * on the stack. You process 5, which goes in the queue. Now you've reached the end of the input, so you pop the stack and add the *, and your queue looks like 3 4 + 5 *. Am I somehow misinterpreting the algorithm? Based on the way it's written, it doesn't look like it's possible to get more than one operator in the stack at a time, which I don't think is correct. Is the algorithm itself miswritten? The professor is pretty bad at proofreading his project guidelines, so it's always a possibility that he's given us bum data to work with. I'd talk to him or the TA, but the professor never answers his email and the TA missed our 2pm appointment today; apparently his alarm didn't go off and he slept through it.
|
# ? Jun 18, 2012 22:17 |
|
Coca Koala posted:You process the *, and it's an operator. So you pop everything on the stack, which means now you're looking at the +. The + is an operator of lower precedence than the *, so you cease popping items from the stack, enqueue the +, and push the * on the stack.
|
# ? Jun 18, 2012 22:28 |
|
Jesus christ. Thanks for clearing that up, I appreciate it.
|
# ? Jun 18, 2012 22:56 |
|
Zombywuf posted:Well, it all depends on how far you're willing to bend to special snowflakes. There are times I've been tempted to change my name to something that has no valid normal form in unicode as a big gently caress you to the world. Trimming (and normalising) whitespace and disallowing combining chars where they don't belong is reasonable, however if you're allowing symbols you might as well allow as much punctuation as they want. I guess it depends on what the use case is if you want allow Zalgo usernames. Could you point me to an example or examples of Unicode strings that do not possess a normalisation form? What is the result of applying the normalisation algorithms to strings like that? Is there a collection anywhere of pathological examples of Unicode text? I hadn't considered the idea of letting users have separate login and display names (potentially with different restrictions applied). I guess that has its advantages and disadvantages. It also reached my attention that there are some category C characters that there might be reason to allow, such as ZERO WIDTH NON-JOINER Goat Bastard posted:The question I always ask myself when defining validation requirements is "what real problem am I trying to solve with this validation?". Although this is very reasonable and sensible advice, I am paying such inordinate attention to this in part because it is an opportunity for me to improve my understanding of Unicode and related topics.
|
# ? Jun 18, 2012 23:25 |
|
Hammerite posted:Could you point me to an example or examples of Unicode strings that do not possess a normalisation form? What is the result of applying the normalisation algorithms to strings like that? Is there a collection anywhere of pathological examples of Unicode text? Ah wait, I was getting confused about technically illegal unicode strings and normal forms. There are certainly invalid unicode strings but it seems the Unicode Consortium were still kind enough to give them a normal form. e.g. space byte_order_mark combining_ring_above.
|
# ? Jun 19, 2012 00:11 |
|
I'm interested in doing some research on determining a person's worldscope. By worldscope I mean the rough physical area of the earth that their life covers (work, play, living, etc.). For example, Joe's worldscope is confined to 30 miles within the center of Oklahoma City, OK - he lives and works there, seldom leaves, and most of his friends/family are there. Now I'd like to write some code to do figure this out for me, my question isn't really with the code but with what kind of data could I use and how do I get it. A couple of ideas would include analyzing a person's Facebook friends list, their check-ins via Facebook/Foursquare, and locations that they tweet from. However, I have very little idea how to obtain those data, if it is even possible. The application for this is to figure out how large of an area a person cares about what weather is happening. The hypothesis is they would only care about what is happening within their worldscope, so figuring out what that is would be highly useful for communicating weather information.
|
# ? Jun 19, 2012 08:36 |
|
|
# ? Jun 8, 2024 13:47 |
|
I'd whitelist unicode display names, not blacklist. Allow common alphabets and maybe punctuation, special case RTL alphabets and make sure everything normalizes. Even if you do this people are going to be able to 'forge' other user's display names because of the common practice of reusing glyphs for nonequivalent characters.
|
# ? Jun 19, 2012 09:55 |