|
quote:if ($_POST[$field])
|
# ? Aug 2, 2011 21:31 |
|
|
# ? Jun 8, 2024 19:44 |
|
Does anyone have recommendations for a programmer-friendly hosting service? I primarily want to try writing a small client/server setup in .NET and put the server part up somewhere that I can connect to from wherever. This is mainly a learning project since I've never done anything cross-network before so it wouldn't need any fancy bandwidth/storage/cpu specs, but if they had database access of some kind and maybe FTP or web page hosting that'd be cool. I just finished participating in the SA GameDev competition, and a lot of the other entries feature high-score leaderboards. I realized that I have no clue how to do that kind of thing but that would be a good first target application. Any book recommendations for this kind of programming would be great too, especially if it came from a .NET angle for the non-fundamentals parts.
|
# ? Aug 2, 2011 21:41 |
|
PDP-1 posted:Does anyone have recommendations for a programmer-friendly hosting service? I primarily want to try writing a small client/server setup in .NET and put the server part up somewhere that I can connect to from wherever. This is mainly a learning project since I've never done anything cross-network before so it wouldn't need any fancy bandwidth/storage/cpu specs, but if they had database access of some kind and maybe FTP or web page hosting that'd be cool. Just get a cheap VPS at prgmr.com and run whatever you... Windows Just get a cheap VPS at prgmr.com and write a bunch of .NET stuff that runs on Mono, use whatever Unix-supporting database you want, have fun. Or get a VPS that runs Windows somewhere that hosts such things. It will be more expensive due to licensing, and it will probably suck. By the way, you don't really want FTP hosting, so just forget about that.
|
# ? Aug 2, 2011 21:55 |
|
PDP-1 posted:Does anyone have recommendations for a programmer-friendly hosting service? I primarily want to try writing a small client/server setup in .NET and put the server part up somewhere that I can connect to from wherever. This is mainly a learning project since I've never done anything cross-network before so it wouldn't need any fancy bandwidth/storage/cpu specs, but if they had database access of some kind and maybe FTP or web page hosting that'd be cool. Find a vhost provider that does windows. Won't be cheap compared to linux, but hey, at least your not trying to write a server in Cocoa. I don't even know if mass hosted mac vhosts even exist. But yeah, its always going to be more expensive in windows, because frankly windows just isn't good at being squeezed into resource constrained spaces like you can do with linux (by just stripping poo poo out till it fits comfortably), and any host has to pay licencing fees. Interestingly however once you go up the scale the difference in price isnt too much different. Microsoft are not stupid and your vhost provider isn't paying store prices for win server , but rather they tend to have fancy negotiated licencing plans with microsoft that make it economical for them. MS knows full well any sale is better than no sale, and adjusts accordingly. It will be interesting to see how microsoft reacts to the interest being shown by the datacenter world towards ARM as a possible future, as the biggest issue datacenters have is heat and power, and ARM currently murders intel on this front. The ability to make a 1U server thats basically a tiny lunchbox of micro blade servers running scaled back "appliance" OS's+server software would be a loving killer in this space, and if Win8 can deliver a cut down appliance server version for arm, it will allow for very cheap hosting that can do dot net. But that future aint quite here yet. duck monster fucked around with this message at 05:54 on Aug 3, 2011 |
# ? Aug 3, 2011 05:47 |
|
I'm currently having a giant annoyance with eclipse where the tabs at the top only seem to show the last segment of the directory and not the filename, and I have to hover over the tab to get the file name. This is using PyDev for django work. Ie a file called /project/appname/views.py will just say appname in the tab, which is annoying since if I've got 5 tabs all in the appname directory its just five tabs saying appname. It didn't used to do this, and I'm stuffed if I can work out what I've changed. Anyone know how to fix this?
|
# ? Aug 3, 2011 06:05 |
|
Standish posted:This does not ensure that $_POST[$field] is an array. Thanks to this post, I just learned about is_array(). Thanks for your help!
|
# ? Aug 3, 2011 15:09 |
|
Say I declare two classes, A and B, and A has an instance of B as a field. What would I call A in this relationship? Typing "the x utilizing this instance" in my documentation or whatever is tiring and messy. Parent? Encapsulator?
|
# ? Aug 4, 2011 03:05 |
|
Perhaps "Owner"? "Parent" is already used to indicate inheritance. "Encloser" could work, but "Enclosing class" is taken to mean a class which contains an innner class definition, as in Java.
|
# ? Aug 4, 2011 03:39 |
|
In UML speak this is called Aggregation.
|
# ? Aug 4, 2011 03:49 |
|
So you would say that A composes or aggregates (based on the situation) the instance of B? Thanks much. I realize this is a mundane question but when I do get around to commenting I get pretty OCD about it, partly because I hate looking at stuff a week later and not know what the hell I did.
|
# ? Aug 4, 2011 04:02 |
|
Another term for composition is a "has-a" relationship (as opposed to the "is-a" relationship of inheritance.) You might get some results with that, although I do admit it's really generic for a search string.
|
# ? Aug 4, 2011 04:25 |
|
Fellow humans fluent in machine speak, I beseech thee! For someone who has a very novice level of coding experience, what would be the easiest and most efficient way to install a batch of programs with a single click on an XP/W7 machine??? I'm playing interim sysadmin at a small business and I need to be able to setup windows machines fast and efficiently. I'm not terribly familiar with programming in general, but I'd love to learn how to program things such as windows installers and what-not. What would y'all recommend?
|
# ? Aug 4, 2011 07:33 |
|
CrazyBumFungus posted:Fellow humans fluent in machine speak, I beseech thee! You should probably use something designed for this task, like this.
|
# ? Aug 4, 2011 12:34 |
|
Anyone have any experience with the NSIS installation scripting language? This is it: http://nsis.sourceforge.net/Main_Page Im getting a loving weird bug in this thing which is totally doing my head in and ive made no progress after banging my head against the wall all morning! Basically ive got an install script made by a previous developer, in the process of adding a couple of things to it ive noticed its doing something very strange. Its control flow is for no apparent reason pissing off to another place in the script. The easiest way ive found so far of following how this thing works is by sticking message boxes in it like the below syntax: code:
code:
Now before anyone says hey stupid, there is quite clealy a SectionEnd before z3, sections in the NSIS scripting language are not methods or functions, they are just ways of splitting the script up into nicely named chunks. Control flow will pass straight from one to another (apart from in this loving case!) I cant post the whole script, not really mine to post. Ive tried: Reading the gently caress out of the documentation. Commenting out all my changes, still does the same thing. Checking for a new version of NSIS in case of bug in it, hasnt been a release since 2009. Frankly im at my wits end, this should be an easy change goddamit! Im close telling the boss he might actually have to buy a copy of installshield express or something instead of doing everything with loving freeware! If anyone knows what the hell is going on here, please tell me and I would be enternally greatfull, i'll post you a jar of Tiptree Jam http://www.tiptree.com/ , widely regarded as the best jam in the world!
|
# ? Aug 4, 2011 13:04 |
|
Documentation. Everyone hates it, but it's in most cases a necessity in any job. Well, anyone who is a techie and hates documentation would hate to be in my situation. Without going into too many details, I'm forced to document a system that I didn't build, and I also don't have access to. Consultants build, maintain, upgrade, and enhance the system. I don't know what's going on, and they don't provide any documentation unless asked, and even then it's something generated from MySQL Workbench in 2 minutes. Sorry, I digress. Needless to say, in order to avoid getting fired, I need to do this documentation. I'm looking for some good documentation examples on documenting web applications, right from the hardware on up. I have Visio, but I lack the creativity to get started. If this was something that I built, I feel I would have better luck without needing to rely on samples.
|
# ? Aug 4, 2011 13:36 |
|
Rick Rickshaw posted:Documentation. Everyone hates it, but it's in most cases a necessity in any job. Well, anyone who is a techie and hates documentation would hate to be in my situation. Without going into too many details, I'm forced to document a system that I didn't build, and I also don't have access to. Consultants build, maintain, upgrade, and enhance the system. I don't know what's going on, and they don't provide any documentation unless asked, and even then it's something generated from MySQL Workbench in 2 minutes. You could have a bash at changing the headings to something relevant and filling in the sections.
|
# ? Aug 4, 2011 15:53 |
|
Hi friends, I have a question if anyone would be kind enough to answer it (web development related): I mainly work in HTML/CSS/Jquery with some PHP thrown in. I barely even know where to start so I'll lay out the problem first. My company manufactures products (mostly) for professional clients, who then go on to sell to end users. I work in a relatively small industry so I would rather not elaborate further. Anyways the issue is this: there are some legitimate reasons for an end user to create an account on our site to buy certain items, but this tends to upset our professional clients occasionally as an end user will see a price for a given item on our site and question the admittedly much higher resale price that they are being quoted by our professional clients. So basically I am looking for a way to show prices on our website based on the privileges associated with an account. We use MySQL to handle account details, so if we could use a method that pulls directly off MySQL would probably be ideal, but who knows I am no expert. Our back end is written in ASP/VBscript, if that helps, although I would like to bypass that system and have a standalone app that queries our database. My apologies if anything in this post seems "tech lite", I have little experience in this kind of development.
|
# ? Aug 5, 2011 19:06 |
|
Taima posted:Hi friends, I have a question if anyone would be kind enough to answer it (web development related): I'm not sure I understand what your question is. I mean, I understand that you want to show different prices depending on the users privileges, but that is basically how you do it: You assign privileges to users, and then show the prices depending on the privileges. The simplest would be to use groups. Set up a number of groups (clients, endusers, etc). Associate the users with the groups as appropiate. Then in the code that fetches the prices, have it select different sets of prices depending on what group the user is in.
|
# ? Aug 5, 2011 20:48 |
|
A question of my own: I have a list of names, which has a bunch of annoying duplicates. I have succesfully grouped the duplicates into sets, and I now want to merge them into the "best" one. Constructed example of such a duplicate set: 1. Juergen Mueller 2. Jürgen Mueller 3. Jürgen Müller <- best 4. Jurgen Muller Assuming I have a method that can perfectly translate unicode strings to their canonical ASCII representations (ie. "Jürgen" => "Juergen"), I'm thinking about doing it this way (pseudocode): code:
In other words, the above example ends up like this: 1. Jürgen Müller (Jaro-Winkler: 0.785454545455) <- best! 2. Jürgen Mueller (Jaro-Winkler: 0.804615384615) 3. Jurgen Muller (Jaro-Winkler: 0.882393162393) 4. Juergen Mueller (Jaro-Winkler: 1.0) I've done some preliminary tests, and it seems to give correct results, but I can't figure out if it'll be accurate enough to run unattended (there are 1.5m+ records in total, so I wouldn't want it to poo poo all over them). Edit: Also if anyone can recommend good books on record linkage/pattern recognition/duplicate searches/etc, that would be awesome. Carthag Tuek fucked around with this message at 21:44 on Aug 5, 2011 |
# ? Aug 5, 2011 21:12 |
|
Carthag posted:I'm not sure I understand what your question is. I mean, I understand that you want to show different prices depending on the users privileges, but that is basically how you do it: You assign privileges to users, and then show the prices depending on the privileges. Thanks, I do understand that in a general sense, but what would be a good direction to write or utilize an app that a user could input their login credentials, then it would display the prices after checking if the user had the correct group? I would prefer if it was a self-contained app that could be deployed to individual pages as needed. Sorry if I'm being stupid, I am so far outside of my comfort zone on this it's ridiculous, but that's the best way to learn I suppose
|
# ? Aug 5, 2011 22:38 |
|
Taima posted:Thanks, I do understand that in a general sense, but what would be a good direction to write or utilize an app that a user could input their login credentials, then it would display the prices after checking if the user had the correct group? I would prefer if it was a self-contained app that could be deployed to individual pages as needed. It depends on how the prices differ. So you have 'your' prices correct? The problem I see is that you probably don't have all of your professional clients prices (are they all the same? or does vendor A charge $X and vendor B charge $Y?). The way I see it there's a a couple options: 1. Show your prices, but scale them all up a quasi-ridiculous degree so they're always higher than your professional clients (e.g. on the page display price*1.5). You could do this on the database side as well if you want; you'd probably want multiple stored procedures like: Products_SelectBasePrice() and Products_SelectPublicPrice() and you would call a different one depending on what login account/type the user had. From a logic perspective you'd have to add a check on every page that contains prices. The problem is your question is a bit generic, so there's tonnes of different solutions. For example you could modify whatever gets the price, to include the user id/group id, e.g. GetPrice(ProductID,GroupLevel) and then that function could decide which price to send back. Or, you could have a permission check on every page that sets a boolean, e.g. If GroupLevel IN (5,16,33) then CanSeePrices=True (this is a bad idea by the way since it means you have to define the 'good' group ids on the page). Sorry if this seems a bit disorganized, but there are literally dozens of solutions.
|
# ? Aug 5, 2011 22:47 |
|
Carthag posted:A question of my own: I have a list of names, which has a bunch of annoying duplicates. I have succesfully grouped the duplicates into sets, and I now want to merge them into the "best" one. see also: megaphone/soundex and Unicode normalisation to strip non ASCII chars, Google refine is also good for cleaning data
|
# ? Aug 6, 2011 11:45 |
|
tef posted:see also: megaphone/soundex and Unicode normalisation to strip non ASCII chars, Metaphone and soundex are good for identifying likely duplicates, but I already have that part mostly accomplished. I'm basically looking for a way to identify the "best" of a given set of duplicates that will become the "true" record, and doing so in the most automatic way possible. Hence the "longest distance from ascii-representation" method that I'm currently looking at. I guess I'll have to either a) accept false positives, or b) make the algorithm stricter and then sift through the "likelies" by hand.
|
# ? Aug 6, 2011 11:53 |
|
code:
|
# ? Aug 6, 2011 12:33 |
|
Sorry, I guess I was a bit vague. I have a method of turning unicode into ascii. I also have identified likely duplicates. I describe a method for finding the "best" candidate among a number of duplicates, and I would like to hear some thoughts on the soundness of this method.
|
# ? Aug 6, 2011 20:59 |
|
Carthag posted:Sorry, I guess I was a bit vague.
|
# ? Aug 7, 2011 01:31 |
|
Carthag posted:Sorry, I guess I was a bit vague. Your approach is reasonable if "best" means "longest distance from ascii-representation", but of course that's entirely circular. You haven't said what constitutes "best", so your question is unanswerable. If your question is really "what criteria should I use to determine best" then it's still unanswerable because no one here knows enough about your system to tell you that.
|
# ? Aug 7, 2011 05:13 |
|
Does anyone have any experience with Enclojure? I can't for the life of me figure out how to get it to understand dependencies in any kind of useful manner (I add them to the dependencies list, and I can download them, but actually getting them to go somewhere that the REPL can find them is hit-or-miss at best).
|
# ? Aug 8, 2011 00:24 |
|
Scaramouche posted:Helpful Information Excuse not responding for a moment, weekend and all. I appreciate that you took time out to write this and it will provide some good leads on how to solve my issue. Thanks.
|
# ? Aug 8, 2011 00:40 |
|
Nippashish posted:Your approach is reasonable if "best" means "longest distance from ascii-representation", but of course that's entirely circular. Yeah it's a bit of a lovely situation, since "best" is an entirely made up quality. I guess I'll try this method in a non-destructive manner and then see if it works out before finalizing the change.
|
# ? Aug 8, 2011 09:25 |
|
Carthag posted:Yeah it's a bit of a lovely situation, since "best" is an entirely made up quality. I guess I'll try this method in a non-destructive manner and then see if it works out before finalizing the change. what would constitute "working out"?
|
# ? Aug 8, 2011 12:55 |
|
TasteMyHouse posted:what would constitute "working out"? No complaints from the top floor.
|
# ? Aug 8, 2011 14:22 |
|
I honestly think what you are looking for is a sort of threshold level of 'bad'. That you can set and play with if that makes sense. How you define that and even what you derive it from is hard to tell.
|
# ? Aug 8, 2011 17:55 |
|
Graviton v2 posted:I honestly think what you are looking for is a sort of threshold level of 'bad'. That you can set and play with if that makes sense. How you define that and even what you derive it from is hard to tell. His idea to rank them and take the best one is sound, and doesn't require a threshold. The issue is defining a goodness measure, because it isn't clear what makes one alternative better than another. To do thresholding you still need a goodness measure (so it doesn't make the problem any easier), and specifying a threshold is going to cause other problems as well. How do you set the threshold? What does having a threshold gain over just taking the best from each group? What do you do when two alternatives are above/below the threshold?
|
# ? Aug 8, 2011 19:30 |
|
Nippashish posted:His idea to rank them and take the best one is sound, and doesn't require a threshold. The issue is defining a goodness measure, because it isn't clear what makes one alternative better than another. Basically Carthag I think you need to give us some more info here if you can.
|
# ? Aug 8, 2011 22:43 |
|
I know that many languages have first-class functions. What scripting languages have first-class types, in the sense that a function can return a type? So for example a function can return the type integer. (which is not nearly the same thing as returning an integer.) Example: suppose a scripting language allows you to use decimal types to carry out calculations to arbitrary (but obviously, finite) numbers of decimal places. So you might have a function decimal() taking one argument that returns a type representing decimals accurate to the number of decimal places represented by the argument. Then if I wanted to calculate the square root of 2 correct to 50 decimal places, I might write something like decimal(50)::sqrt(2); in which :: is meant to be the static member operator, with sqrt() being a static method of the type returned by decimal(). Are there any scripting languages that exhibit behaviour resembling what I describe? Or am I describing something that cannot work? (I say scripting language because I have in mind that this should be something that works through dynamic typing, which is something I perceive to be characteristic of scripting languages.) Hammerite fucked around with this message at 11:11 on Aug 9, 2011 |
# ? Aug 9, 2011 11:09 |
|
Graviton v2 posted:Well it depends on the requirements which are not clear (to me) at the moment. If 'Good' is required to always 100% be 'Good' then a threshold approach cant work. If however 'Good' is only needed to 90% success rate that approch will work. Well they're artist names; and my boss is annoyed that they aren't the same rows in the DB (which I'll agree is a legitimate concern). The data itself comes from external partners and is outside our control. So what we're doing is marking "artist A" as a duplicate of "artist B" so when someone attempts to use "artist A" in the future, they'll receive "artist B" instead. But I don't have any better definition of "best" than "Boss will know it when he sees it." So maybe my question is more like "can you think of edge cases where using 'unicode is furthest from ascii' as the qualifier will cause problems?" Jurgen => Jürgen Raul => Raúl etc are all good.
|
# ? Aug 9, 2011 11:18 |
|
Hammerite posted:I know that many languages have first-class functions. What scripting languages have first-class types, in the sense that a function can return a type? Python
|
# ? Aug 9, 2011 11:29 |
|
tef posted:Python OK, further question. A brief search shows that in Python, when you want to declare a function f you do so by writing code:
code:
code:
A similar consideration applies to declaring classes. Instead of writing code:
code:
|
# ? Aug 9, 2011 11:49 |
|
|
# ? Jun 8, 2024 19:44 |
|
MY CONSISTENCY python eschews anonymous definitions -- ask yourself how you would do this in a language without braces. anyway, def and class both bind to a variable in that space. it's a syntactical difference i.e def foo():pass; x=foo; x() tef fucked around with this message at 12:47 on Aug 9, 2011 |
# ? Aug 9, 2011 12:44 |