|
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. |
Thanks. I've figured out it's some library called BeautifulSoup as well.
I've also tried this HTML Agility Pack, and it seems nice. I've gone as far as parsing these kinds of strings (where players and their score are):
"\n\n3 위\nnoinsung\n207\n88\n3342\n" "\n\n2 위\neternal.pose\n210\n90\n3359\n"
I guess what's needed there is to use some regex to ignore other strings which do not look like those ones. Then, some string split by "\n" delimiter if the front bit of those strings is ignored up to players' names.
Anyway, thanks for help. It's good to learn something new. 
|
|
Is this from that Kik debacle? I thought it was basic knowledge that you download a library and not link to a website. For example on the Jquery site 10 links to download it before you scroll down to the link to it just to avoid this problem.
Node.js was destroyed?
+ Show Spoiler +Why would you want to install a 500kb dependency that has only one function you need, when you can install a 10kb dependency that has it?
Would you want each of your five 20kb dependencies to re-implement the same 5kb function, increasing the code you must send to the client by 20%, or would it be more optimal for each of those dependency to use the same 5kb function?
The author comes from rants about practices of developers from different programming environment, without experience, without figuring how things came to be in the first place. If he did give an effort to think from the perspective from Node.JS developers he’d have addressed the previous two points.
This is like going to a friend’s house and complaining everything is put in the wrong place. It would have been wise to immerse in Node.JS conventions and observe for a while before making comment
Anyone have an idea as to why downloading this left-padding thing would cost 500kb of resources, whereas linking to it costs 10kb? That doesnt make sense to me.
|
|
On March 24 2016 15:09 Thaniri wrote: Anyone have an idea as to why downloading this left-padding thing would cost 500kb of resources, whereas linking to it costs 10kb? That doesnt make sense to me. I don't think that commenter knew what he was talking about?... The debacle was that literally the entire npm ecosystem chose to take on a dependency on the 11-line 'left-pad' package rather than implementing a leftpad() function themselves 
Whether or not this is a Good Thing (tm) is of course up to you... but the whole thing I think really illustrates why Javascript is a super fucking weird place for a C++ programmer :D
|
if (!isset($var) && intval($var) > 0) { ... }
The things I find...
|
Stupid Problem that stole me way too much time by now and shouldn’t even exist:
I got a python-script that I run when logging into windows. To start it I use a .cmd like this:
@echo off START python [path] \MIN
The .cmd itself works great however ever since I installed pythontools for visual studio, on startup instead of launching the script like it used to be, a popup appears where windows asks me how I would like to run it(using python or visual studio) only to close that popup a split-second later while not executing my script at all. + Show Spoiler +Not like that I already specified in the goddamn .cmd which way I want it to open. But wait, I don’t want to open this script. Let me just real quick give you these 2 options instead. Oh that was too fast for you to click? Well, have a kick to the shin instead while I proceed to do nothing of what you asked me to and laugh in binary. That’s how I imagine the situation by now. The weird thing is that it only does this on login. If I execute the .cmd at any other time, it works just fine. At this point my only solution left is to uninstall pythontools for visual studio and accept that all OS can be quite amazing at times....
- Everything worked just fine previously - Installing pythontools for visual studio broke things - Open .py-files is correctly set to python launcher - .cmd works just fine at any other point then logging in - Already reinstalled python to no effect
|
What happens if you use the full path and name of the Python .exe?
|
On March 25 2016 19:30 Ropid wrote: What happens if you use the full path and name of the Python .exe?
Already tried that to no effect.
|
Trying to fix one small issue, I navigate to the code and see this:
public function someFun() { error_reporting(0); ini_set('display_errors', 0);
// 500 lines of code }
At this point I know I'm in trouble...
|
On March 25 2016 17:56 waffelz wrote:Stupid Problem that stole me way too much time by now and shouldn’t even exist: I got a python-script that I run when logging into windows. To start it I use a .cmd like this: @echo off START python [path] \MIN
The .cmd itself works great however ever since I installed pythontools for visual studio, on startup instead of launching the script like it used to be, a popup appears where windows asks me how I would like to run it(using python or visual studio) only to close that popup a split-second later while not executing my script at all. + Show Spoiler +Not like that I already specified in the goddamn .cmd which way I want it to open. But wait, I don’t want to open this script. Let me just real quick give you these 2 options instead. Oh that was too fast for you to click? Well, have a kick to the shin instead while I proceed to do nothing of what you asked me to and laugh in binary. That’s how I imagine the situation by now. The weird thing is that it only does this on login. If I execute the .cmd at any other time, it works just fine. At this point my only solution left is to uninstall pythontools for visual studio and accept that all OS can be quite amazing at times.... - Everything worked just fine previously - Installing pythontools for visual studio broke things - Open .py-files is correctly set to python launcher - .cmd works just fine at any other point then logging in - Already reinstalled python to no effect
Well, I managed to hack my way around the problem... I just added a wait-statement to my .cmd file. I have no idea why but now my pythonscripts get started properly 
|
Hyrule19144 Posts
On March 25 2016 22:14 Manit0u wrote:Trying to fix one small issue, I navigate to the code and see this: public function someFun() { error_reporting(0); ini_set('display_errors', 0);
// 500 lines of code }
At this point I know I'm in trouble... oh sweet zombie jesus
how many things melt down when you turn on errors?
|
On March 25 2016 15:00 Manit0u wrote: if (!isset($var) && intval($var) > 0) { ... }
The things I find...
Forgive my ignorance but from my limited understanding... Um... What is he trying to do again? Is he checking for $var to be not set and try to get an integer value from it?
|
On March 26 2016 00:53 WrathSCII wrote:Show nested quote +On March 25 2016 15:00 Manit0u wrote: if (!isset($var) && intval($var) > 0) { ... }
The things I find... Forgive my ignorance but from my limited understanding... Um... What is he trying to do again? Is he checking for $var to be not set and try to get an integer value from it?
Pretty much. This condition can only be true if the variable is at the same time not defined or null and still greater than zero, which can't happen since the integer value of a null/undefined value is 0.
|
On March 25 2016 23:35 tofucake wrote:Show nested quote +On March 25 2016 22:14 Manit0u wrote:Trying to fix one small issue, I navigate to the code and see this: public function someFun() { error_reporting(0); ini_set('display_errors', 0);
// 500 lines of code }
At this point I know I'm in trouble... oh sweet zombie jesus how many things melt down when you turn on errors?
I don't even want to know. I've discovered the painful way that even if you do stuff like:
fopen('php://output', 'w');
To say send csv data without having to save it to file first you get a bunch of html stuff in there unless you do ob_clean() first...
I even forgot such functions exist in PHP and I'm not sure if it's the case of ZF1 being super shitty or this many-years-old project screwing it up even more.
On March 26 2016 05:08 Morfildur wrote:Show nested quote +On March 26 2016 00:53 WrathSCII wrote:On March 25 2016 15:00 Manit0u wrote: if (!isset($var) && intval($var) > 0) { ... }
The things I find... Forgive my ignorance but from my limited understanding... Um... What is he trying to do again? Is he checking for $var to be not set and try to get an integer value from it? Pretty much. This condition can only be true if the variable is at the same time not defined or null and still greater than zero, which can't happen since the integer value of a null/undefined value is 0.
Yes. Also, I now believe it might be a work of some prankster developer since I keep coming across stuff like:
if (false) { // Hehe } else { // actual code here }
|
Hyrule19144 Posts
my first thought was maybe it's supposed to be
if (!(isset($var) && intval($var) > 0)) { ... }
|
My first thought was that the isset negation is erroneous.
And a question to you guys. If you were to code a rather large system based on the web app (DMS/QMS that runs in the browser), which language/framework would you choose?
You can be as biased in your opinion as you like. I'm researching possible options for some hopefully not too distant future. My boss would like to try with Java (Spring) - personally I have nothing against it except it seems that whenever you have to write something in it you have to write an entire essay worth of code (I do get some serious boner when looking at H2 specs though). Would you consider Scala (Scalatra) or Groovy (GRails) within the Java ecosystem?
Just fire away with your experiences with modern web frameworks (I'm leaning towards Django although I'd definitely like to get some experience with Java-stuff).
|
On March 26 2016 10:36 Manit0u wrote: My first thought was that the isset negation is erroneous.
And a question to you guys. If you were to code a rather large system based on the web app (DMS/QMS that runs in the browser), which language/framework would you choose?
You can be as biased in your opinion as you like. I'm researching possible options for some hopefully not too distant future. My boss would like to try with Java (Spring) - personally I have nothing against it except it seems that whenever you have to write something in it you have to write an entire essay worth of code (I do get some serious boner when looking at H2 specs though). Would you consider Scala (Scalatra) or Groovy (GRails) within the Java ecosystem?
Just fire away with your experiences with modern web frameworks (I'm leaning towards Django although I'd definitely like to get some experience with Java-stuff). I have no idea about Scalatra but we use some Groovy within our Java ecosystem, use of groovy is definitely not web-related though, we use that in our rule engine. We put groovy scripts in the database and run those scripts whenever the rule is invoked. Works pretty well. 10/10 would use again.
Might wanna check out Vaadin. It also works well with Java ecosystem as far as I've read so far.
|
This Vaadin thing looks amazing. I'll definitely look into that.
|
just dropping in to say i just left my junior programming job after 6 months (after giving 6 weeks notice)
i saved up some money (4500 lol) and going to take a year to learn to draw and try to become an artist instead
just thought you'd like to kno since you saw me pass my uni degree last year (barely) and go on from there
programming was pretty much what i expected - hard, relentless, lonely 9 hour days with a lot of feeling like shit for being incompetent (in my eyes), a lack of traditional skills progression due to the nature of my particular job and not being smart enough to make larger leaps in progression/understanding and also not having any real interest in it, and ultimately feeling like i was wasting my life , just a human machine that might aswell not even exist
i made a good friend (the guy who sat next to me for 6 months) and everyone had really kind words for me
maybe i will use my (limited) skills in the future that i learnt in the job to combine with my art. i mean the option is there (i worked with flash/as) just i am shit at it and not smart enough and hate it so fuck. lol
the dream now is to get good enough at drawing then digital art and maybe make my own visual novel game for some sort of commercial release. that would be the dream i start monday . and got ~10+ months to succeed (else its back to applying for programming jobs or my mom will go mad lol)
also im looking for a cheap place to live FYI
|
|
|
|