[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/dpt/ - Daily Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 16
File: 1447215635967.png (679 KB, 600x602) Image search: [Google]
1447215635967.png
679 KB, 600x602
No traps edition

Previous thread at >>51882900

What are you working on, /g/?
>>
Learning Django so I can get the monies
>>
if I were working on something I wouldn't be on /g/
>>
>>51894993
>edition
>no sicp or anything cs related
Just kill yourself faggot
>>
>>51895015
also no anime image
>>
>>51894993
>What are you working on, /g/?
My job...
AngularJS + J2EE
It's OK. I like Java for web development more than I expected. The long build process and startup time can be annoying but once it runs, it's pretty fast.
>>
Isn't averaging two ints as easy as doing (a/2) + (b/2) + (a%b%2) (because division truncates towards zero)?
>>
>>51895065
yeah I prefer the look of a&b&1 for the last bit though
>>
>>51895065
What's wrong with (a+b)/2 exactly? I know it rounds down, but the only alternative is to round up instead. Is one more "correct" than the other?
>>
>>51894993
Working on my wife's son's penis, if you know what I mean ;)
>>
>>51894667
>>
>>51895065
>a%b%2
m8
>>
>>51895083
(a+b)/2 overflows.
>>
>>51895083
overflow, numbnuts.
>>
>>51895078
>prefer the look
cssfag detected
>>
File: are you a wizard-525x700.jpg (39 KB, 525x700) Image search: [Google]
are you a wizard-525x700.jpg
39 KB, 525x700
>>51895065
>>
>>51895083
it's a meme because C doesn't have overflow checks builtin or a bignum library(builtin, that is)
>>
>>51895101
>obfuscating code to make it "more beautiful"
damn webfags
>>
>>51895095
>>51895096
oh yeah. lol
>>
>>51895065
Yeah that works but only for averaging two ints.
When it gets real hardcore and you average three ints, things get tricky
>>
File: ss+(2015-12-16+at+04.53.15).png (91 KB, 929x485) Image search: [Google]
ss+(2015-12-16+at+04.53.15).png
91 KB, 929x485
I implemented Waifu2x in C# using OpenCL.
>>
>>51895124
>beautiful
you keep saying that, fgt; this ain't /wdg/
>>
>>51895065
sorry to disappoint all of y'all but this returns -1 instead of 0 for avg(-2, 1)
>>
>>51895138
>C#
>>>/trash/
>opencl
>>>/large trash/
>>
>>51895124
>he thinks a%b%2 is the same as a&b&1
>>
>>51894993
public class OP {
// just started learning
public static void main (String [] args) {
System.out.println("is a fag");
}
}


In all seriousness, I've been using the code academy intro to Java and anything past that asks for a $20 a month membership.

What program should I download to get a console thing like that (has console, and run button, errors show up in next screen)? Also downloaded Java a beginners guide sixth edition.
>>
>>51895124
>>51895101
absolutely, those webfags proposing a much faster & more easily understandable improvement
how dare they!
>>
>>51895138
No, you took the trained model and hooked it over opencl. It's not the same thing.
>>
>>51895159
>much faster & more easily understandable
you forgot "also wrong"
>>
>>51895157
intellij
>>
>>51895178
I have it installed but everytime I select new project, Java 1.8, its just an empty screen.
>>
how can I check if an int is odd in C? should I loop all odd numbers (starting with the lowest odd one and adding 2 every time) and check if I encounter the one I need?
>>
>>51895163
It kinda is. Trained model needs an implementation to be used. I wrote that implementation.

If I implemented OpenGL to run a game, and said I implemented OpenGL, would you say I did not really implement OpenGL because I also need to rewrite the game itself?
>>
>>51895002
>django
>monies

no, anon.

learn something like Spring or node.js
>>
>>51895207
Not him but I got an offer for a Django job recently
>>
>>51895199
lol. just do x%2 == 1
>>
>>51895207
>memejs
and you denied being a webc᠎uck?
>>
>>51895189
>its just an empty screen.
click on the empty screen and then start writing code in it.
>>
>>51895205
If you said you "rewrote the game in opengl", but all you did was add a plugin that did rendering with opengl instead of DX, then yes.
>>
Me again shamelessly spamming my project.

C compiler. Give it a try.

https://github.com/lugon/LuxCC
>>
>>51895220
>-1 is not an odd number
webfag confirmed
>>
>>51895199
a&1 - returns 1 if odd, and 0 if even
>>
>>51895159
>much faster
compilers should optimize a%b%2 to a&b&1, i'm certain.
>more easily understandable
how is it any more easy to understand?
>>
>>51895224
>he doesn't know that the filter for cuck has been removed!
>>
>>51895245
only half the time
>>
>>51895240
Looks like a tremendous amount of work, hats off, but I fear it exceeds the attention span of 4chan users
>>
>>51895248
>should optimize a%b%2 to a&b&1
they shouldn't, because they're not the same thing
>>
>>51895236
I implemented Waifu2x in C# using OpenCL.

My implementation can use various models to apply Waifu2x upscaling algorithm to enlarge images.
>>
>>51895241
x % 2 != 0
or
x&1
>>
File: 01porsche911gt3rs.jpg (417 KB, 1700x1136) Image search: [Google]
01porsche911gt3rs.jpg
417 KB, 1700x1136
SaaS web app for a specific industry for business management. Got a partner who works for the 2nd largest company in this industry in the US with hundreds of contacts to their contractors in my area. Getting an MVP ready to go and hopefully make some mills. I'll be on /o/ posting my Porsche and Vette collection in a year.
>>
>>51895275
Then you didn't implement waifu2x, you implemented an interface for waifu2x.
>>
>>51895256
(a*(a>0)-(a<0))&1

there you go
>>
>>51895278
>or
>implying they're equivalent
bro, do you even C?
>>
>>51895215
I'm actually kind of surprised by that. I thought django was slow as fuck. you can use something like Sails.js for rapid development, and it will have much better performance.
>>
>>51895289
framework fag detected
>>
>>51895294
I didn't say they were equivalent. I intend to say you can use one of the two.
>>
>>51895288
Waifu2x is an algorithm. Waifu2x is an algorithm that takes a trained model and an image as input, and produces an image with added details (or removed noise, depending on what model you use). You cannot just write interface for the algorithm. You need to implement the algorithm first. I did implement the algorithm.
>>
>>51895289
just as wrong
>>
>>51895310
>>51895331
fuck off
>>
>>51895324
I see that you're retarded. Too bad, I didn't want to waste my time like this. But hey, if you think that you're a bird because you were in a plane once, more power to you I guess.
>>
>>51895323
>didn't say they were equivalent
good, because they give different results
>you can use one of the two
only one of them is correct
>>
>>51895272
>looks at assembly output
shit. my mistake.
>>
>>51895345
You are a sore loser.
>>
>>51895341
>I got told and now I'm mad
Ok
>>
>>51895371
>being memed on is "getting told"
lmaoing @ ur life
>>
>>51894993
>No traps edition
thanks OP.

working on a parser.
>>
>>51895381
>I'm a twitterfag
I could have called it, damn!
>>
>>51895381
>butthurt intensifies
>>
>>51895348
I always use "x % 2 != 0"
>>
>>51895392
>>51895408
>more memes
>>
Just some lame gcode generation programs, because I'm putting off doing documentation.
>>
>>51895381
>knowing C is a meme
Go back to your homescreen thread, please!
>>
>>51895365
Chirp chirp to you too, my friend :)
>>
>>51895299
Bitstamp, one of the largest Bitcoin exchanges uses Django, and it's a really well done site. Very responsive.

Other sites using Django:
Disqus
Instagram
The Guardian
Knight Foundation
MacArthur Foundation
Mozilla
National Geographic
Open Knowledge Foundation
Pinterest
NASA
Open Stack
Rdio

The language really does not matter much for performance. Your database must be optimal, and your caching reverse HTTP proxy configured well.
>>
>>51895392
>he doesn't know @ means "at"
>>
Threadly reminder that if you can't read assembly, you should fuck off to
>>>/wdg/
>>
>>51895434
-400/10.
>>
>>51895421
>meme arrows
>I don't know how to check if a number is odd
why live?
>>
>>51895424
>knowing c isn't a meme
>>
>>51895438
What if I'm a web developer who can read 3 kinds of Assembly fluently?
>>
>>51895435
>he thinks this is twitter
>>
>>51895002
Good call m9.
>>
>>51895449
>desktop thread here I come!
>>
>>51895299
Django isn't that slow. The problem is, it's easy enough for inexperienced devs and designers to use, and shitty slow sites are often produced. Doesn't mean the tool is bad. Necessarily. I'm looking at you ASP.NET. You are bad. And should die. In a fire.
>>
>>51895456
Haven't the cave neckbeards get emails yet?
>>
>>51895477
but did they get tweets?
>>
>>51895481
Probably, since they know the existance of Twitter. Twitterfags.
>>
>>51895449
Knowing C lets you program in the best subset of C++ possible, so it's a great tool to have in your box.
>>
>>51895471
ASP.NET is the best web backend framework there is atm. Everything else is even worse.
>>
>>51895157
Just compile and run from the CLI (with verbosity enabled) if you want rich error logging. You can get the same with an IDE, but I personally don't like enforced project structures and certain other features when I'm learning a language. If you do go for an IDE though, try IntelliJ. You'll get a richer insight into what you're learning if you write your code in a text editor, and get a better grip of the debugging process.

That said, if you're actually working on a project, and not just learning, and IDE will make life easier.
>>
>>51895488
confirmed twittercunt
>>
>>51895494
>best subset
memes again
>>
>>51895497
I'll immediately tell my boss that we must switch all our Linux servers running J2EE to Windows with ASP.Net
Surely our profits and productivity will at least double
>>
>>51895494
How would you know? Are you implying you know either C or C++?
>>
>>51895494
>C
>subset of C++
niceme.me

>>51895147
(a/2) + (b/2) + (a%2 + b%2)
>>
>>51895527
I don't agree with him, but I think he means best subset as in C's paradigm implementation in C++, shitting on OOP
>>
why no trap img?
>>
>>51895527
>(a/2) + (b/2) + (a%2 + b%2)
are you even trying?
>>
>>51895494
>Knowing C lets you program in the best subset of C++ possible
that's wrong in so many different ways i don't even
>>
I'm trying to make a program which will allow you to read a string from a file or input and then apply a shift cipher to it. I've managed to get it to list out the different shifts one by one and have the user choose to either save that specific shift to a text file, or to skip to the next shift, but I'm unsure on how to go about creating some sort of conditional statement at the beginning which will allow the user to chose whether they want all of the possible shifts outputted or just a specific one based on a number they enter.

http://pastebin.com/7iunGTQ4

Any constructive criticism of the code is also welcome.
>>
>>51895514
What is your point exactly? Are you saying J2EE is a better backend for web shit than ASP.NET?
>>
>>51895527
>(a/2) + (b/2) + (a%2 + b%2)
By this point are you guys just typing random characters hoping to get the right function or smth?
>>
>>51895544
>muh degeneracy
>don't want to talk about programming
>>
you average int faggots and 'hurrrrrrrrrrrr webfag' idiots are absolute cancer. promptly off yourself.
>>
>>51895207
Spring and Node.js are just not in demand (at least in the UK), everyone is looking for Rails and Django developers - typically businesses seem to be looking for Rails devs, and agencies want Django devs.
>>
>>51895545
nope. i know it fails with other shit.

if I was going to give a shit about this I'd be using a GNU library.
>inb4 shitstorm
>>
Solution to the average 2 ints problem:

Don't use shitty outdated languages like C
>>
>>51895580
>not using superior BSD library
>not wanting to be cucked by apple
and you call yourself a programmer? fuck off
>>
>>51895574
I'm in the US (east coast).

Old companies all seem to have Spring backends. New companies all seem to want hip JS devs.

There's definitely some demand for Rails as well, but I haven't seen any mention of Django here.
>>
>>51895281
Coupa by any chance? *aaS is the way forward. There is such a demand for quality, fresh-looking ERP systems, preferably using the SaaS model.

Coupa, Workday, and a couple of others are the best examples, taking a boring business function typically dominated by the super clunky ERP Giants like SAP, Oracle, and MSD, and creating something clean, intuitive, and with a positive UX.

I fucking hate old school ERP. Only problem is then integration when all these shiny sexy new systems come in.
>>
>>51895584
>outdated
>all my hardware runs memejs
m8...
>>
>>51895299
>>51895434
This.

It's all about your config and performance tuning.
>>
>>51895611
>Spring
>JS
>Rails
>Django
>>>/wdg/
>>
why is this fking python not working?
def key(k, u, fds):
if isEmpty(u):
return k
else:
x = frozenset([])
for c in u:
udifc = u.difference(frozenset([c]))
if(c not in cover(k.union(udifc), fds)):
x = x.union(key(k.union(frozenset([c])), u.difference(frozenset([c])), fds))
else:
x = x.union(key(k, u.difference(frozenset([c])), fds))
return x
>>
taken from K&R:
void qsort(int v[], int left, int right)
{
int i, last;
void swap(int v[], int i, int j);

if (left >= right)
return;
swap(v, left, (left + right) / 2);
last = left;
for (i = left+1; i <= right; i++)
if (v[i] < v[left])
swap(v, ++last, i);
swap(v, left, last);
qsort(v, left, last-1);
qsort(v, last+1, right);
}

>(left + right) / 2
>(a + b) / 2
>OVERFLOW
TRIGGERED
>>
>>51895438
How does it feel to be the person in the office/studio that all the attractive social people laugh at and avoid?
>>
>>51895611
>I'm in the US
I'm so sorry

>east coast
I'm so sorry
>>
>c#
>>
>>51895682
Don't know, why don't you tell us anon?
>>
>>51895743
#Rekt
>>
>>51895584
>Solution to the average 2 ints problem:
>Don't use shitty outdated languages like C
WTF? Go back to your memes child.
>>
>>51895682
not him, but eh.... not good anon : (
>>
>>51895825
>>51895675
>>
>>51895425
You did not address my argument. All you did in your post was call me a retard. You lost. This is objective.
>>
>>51895675
There is no hope for C desu senpai
>>
>>51895866
Sans mentir, si votre ramage se rapporte à votre plumage, vous êtes le phénix des hôtes de ces bois.
>>
>>51895866
>call me a retard
>lost
m8, that's a win on /g/
>>
How do I learn to read assembly?
I can't seem to get into that mindset
>>
Average 2 ints in java, possible overflow.
I assume it's the same case for C#.
So why are all the faggots crying that C has overflow on numbers when there are other languages that have the same feature, also some claim that those languages are safer than C.
>>
>>51895682
>How does it feel to be the person in the office/studio that all the attractive social people laugh at and avoid?
...he asks, as he sat at home wishing he had a job; wishing he had employable skills; wishing his basement had windows where the sun could caress his pimply exterior; wishing someone would walk by and just for once, ONCE, notice him for more than the memelord he portrays himself as, on a wapanese concentration camp forum.

He clicks post, and feels a little bit better about himself. The feeling is temporary, though. He soon feels the need to make something of this life. Make an impact! He pulls down his trilby and cracks his fingers through his fingerless gloves, while sneering at the screen. "How do you average two ints in C?", he asks the /dog petting thread/, while cackling though his mountain dew and cavities.

He sits back in his gayming chair, almost tipping over, and let's out a sigh of dismay before shouting out to his mother, pleading to be fetched more spaghetti.
>>
>>51895935
>what is python
>>
>>51895935
Java and C# have built-in support for arbitrary precision arithmetic
>>
>>51895935
Because sane languages like scheme, since they implement a full numeric tower, do not have that problem.
>>
>>51895951
>scheme
>full numeric tower
>went full meme
you never go full meme, anon!
>>
>>51895963
>>>/reddit/
>>
>>51895963
https://en.wikipedia.org/wiki/Numerical_tower
>>
>>51895940
nice blog lad
>>
https://en.wikipedia.org/wiki/GNU_Multiple_Precision_Arithmetic_Library
>>
>>51895138
>menustrip

disgusting
>>
>>51895940
Cat > dog.
Prove me wrong.
Protip, you caRUFFRUFFRUFFRUFFRUFRUFFRUFFRUFFRUFFRUFFRUFFRUFFRUFFRUFF
>>
>>51895966
>>51895967
>muh leddit
>muh memepedia
>muh memeoverflow
spotted the cucks
>>
public class HelloWorld{

public static void main(String []args){
System.out.println("" + averageTwoInts(Integer.MAX_VALUE, Integer.MAX_VALUE - 1));
}

static private int averageTwoInts(int a, int b){
return (a + b) / 2;
}
}


-1
>>
File: a mighty ruff victory.jpg (55 KB, 540x292) Image search: [Google]
a mighty ruff victory.jpg
55 KB, 540x292
>>51895981
>
>>
>>51895994
>public
>static
>private
what is this meme?
>>
>>51895978
but can it average 2 ints?
>>
>>51896013
I don't know much about Java. Just did what I needed to make it compile.
>>
>>51896013
It's the jamemeva.
It is IComparable to the cmemesharp.
>>
>>51895673
>>
>>51896013
He wants to run it from a static method but he doesn't want it to be exposed to other classes.

Or he's dumb.
>>
>>51895940
>spaghetti
>not hot pockets
it's like you're not even trying anymore
>>
>>51895138

Also, how is using OpenCL from C#?
>>
>>51895940
>I got rekt so hard by the big dick playa I'm still mad to this day
let it go, m80, you did your best
>>
>>51896062
witchcraft
>>
>>51896078

I meant how are the bindings, not "how is this possible?"
>>
>>51895940
>stale pasta
>>
>>51896092
What? I literally just wrote it.
>>
>>51896104
>literally
Everyone is throwing this word around like crazy on /g/. Is it a new meme?
>>
>>51896168
No, I used it in the correct sense.
I know what you mean though, it's like everyone reverted back to 13 year old girls at school. Like oh, my god!
>>
Say I wanted to guess if a value was 1 or 2 based on all the other values in the row, I would use KNN right? Or is cross fold validation better?
>>
>>51896176
>it's like everyone reverted back to 13 year old girls at school
literally who?
>>
Is there some good pre-setup gVIM in some nice .zip or whatever somewhere? Thought I'd use it for editing latex (using vim integrated in my IDE for java) but goddamn I cna't be arsed setting literally everything up
>>
>>51896199
literally shut up
>>
>>51896168
>>51896199
brb creating extension that replaces "literally" with "figuratively" and "figuratively" with "literally"
>>
>>51896201
literally .zip? or a .tgz would do?
>>
I'm trying to install windows from a usb but after I choose a hard drive it states "Setup was unable to create a new system partition or locate an existing system partition"

I've already tried to make a partition and reboot via
>DiskPart
>select disk 0
>clean
>create partition primary align=1024
>format fs=ntfs
>assign
>active
>>
>>51896213
yeah a tgz would do fine
>>
>>51896215
>literally bait
>>
>>51896215
>a usb but
>>
>>51895994
So why does this return -1?
>>
>>51896215
>a usb
It's called a Jump Stick, my man
>>
>>51895611
Yeah, Spring is quickly becoming a thing of the past. They want hip JS devs for their frontend user interaction stuff yeah. It really depends on the kind of site you want.

Most of the projects I've worked on, in terms of web stuff, very heavy JS, you just get to pull more frameworks together, and save a lot of time.

I like working with teams developing heavily in JS because it opens up the chance to use a lot of tools and frameworks I wouldn't get to usually use from my side (I do test automation architecture), because all the cool shit runs on Node.JS for me.

>>51895642
Systems and solutions are wholistic you fucking idiot, you can't just isolate components off from each other, that's just poor SD practice. But it's okay, no one expects devs to have the ability to see the bigger picture in what they're doing.

>>51895743
Well played anon, I actually lol'd.

>>51895940
Pretty sure I do have a job, more qualifications, and more employable skills than you, but okay, you do you anon. Anyway, back to work, some of us have real impactful products to be creating and delivering to real clients.

Also I'd totally be up for some spaghetti right now. Also a basement would be nice, I'm running out of space to put things, my study is basically unusable from all the boxes of tech I replaced this month, might have to look into getting one, thanks for the suggestion Anon!
>>
File: Selection_436.png (19 KB, 610x183) Image search: [Google]
Selection_436.png
19 KB, 610x183
>>51896240
>>
>>51896240
>Jump Stick
literally what? that's plainly a thumb drive m80.
>>
>>51896213
>>51896168
Kek
>>
>>51896261
kekd
>"How do we mek sure we get big hits dis one?"
>"Jess add erry word you think of."
>>
>>51896258
>heavily in JS
>a lot of tools and frameworks
>cool shit runs on Node.JS
enjoy your webshit bubble
>I do have a job, more qualifications, and more employable skills
doubt it, you can't even check if a number is odd ffs, let alone average 2 ints
>impactful products
>delivering
look ma', I made another web page
fucking cuck
>>
>>51896304
>>51896324
>>
>>51896258
>Pretty sure I do have a job, more qualifications, and more employable skills than you, but okay, you do you anon. Anyway, back to work, some of us have real impactful products to be creating and delivering to real clients.
kek
I'm in my office right now, just closed two client deals and I'm sipping coffee which a webcuck brought me. I do alright, but hey let's keep playing the assume-game, it's making my shift go quicker. L i t e r a l l y.
Spaghetti does sound pretty fucking good right now though, yeah.
>>
>>51896322
Well, I'm gonna bite.

>webshit bubble
Every business in the world runs off ERP software, we implement that. It's entirely web based. All internal services for business are web based. Over 90% of customer facing content is web based. Almost all of the eCommerce market is web based. I could continue for days.

>thinks employable skills consist of nothing but base programming
Have you ever actually worked in a development team? If you read my post you'd see pretty clearly I'm not a developer. Test architect. And I'd list some qualifications but I doubt you'd understand given you probably don't even know an SDLC is. Another code monkey who has no idea about the wider Software Development industry past his own monitor.

>web page cuck ma etc
My company delivered over $30bn in enterprise, eCommerce, and digital solutions to Fortune 500 businesses last FY, what did you guys do?:)
>>
>>51896356
>my shift
wageslave confirmed
>>
>>51896376
Monday to Friday, 8:30am to 5pm.
I can work from home when I want, but it's nice to get out of the house and my office is gorgeous.
>>
>>51896381
WAGE

SLAVE
>>
>>51896375
>ERP
>web based
>customer facing content
>eCommerce
memes
>I'm not a developer
of course, we can tell you don't know what you're talking about
>qualifications
>code monkey
>industry
more memes
>My company delivered
maybe the company for which you slave, don't imply it's yours
>>
>>51896356
>shift
I'm sorry to hear that... Says it all really.

Not even a webcuck but okay? Cross platform nigga. I stay nice and far away from selling the work, that's not my thing. Not a fan of bids, the whole tender process is over engineered and a pain in the ass.

I'd be in my office, but I finished for Christmas yesterday. I'm think bolognese, what's your spaghetti preference?

What kinda deals we talking, what your service offering? This is the bit where we find out we actually work together

>erry day I'm networking
>>
>>51896381
>can work from home when I want
>but Mon-Fri 8:30am-5pm I have to be at the office
SLAVE
L
A
V
E
>>
>>51896381
8:30AM? That sucks.

>>51896414
Yes, memes generate billions in revenue. Business runs off memes. You're really clutching a lot straws now chap. What exactly is that I don't know what I'm talking about, considering I haven't given specifics about anything. Coming from the person who thinks ERP/web is a meme. Would you have us run businesses entirely through desktop applications written in C#.NET? Or are we going to automate business functions entirely through mobile? Let me guess, you think cloud is a meme too? I think we know who doesn't know what they're talking about here

>meme
>meme
>meme

Yes I'm slaving ever so hard right now from my bed. Oh the burn, so much slavery.
>>
>>51896427
You can't read, stop typing please.
I can work at home 8:30 to 5 if I choose to.

>>51896420
No, there is a webdev here who went to get coffee for me. National account manager for a cloud computing firm. Carbonera sounds great right now.

I was supposed to finish yesterday and be paid from the 15th to the 4th for doing absolutely nothing but I wanted to come in, so my last day will be the 23rd. Which really only consists of getting drunk at the office and eating a ton of food with everyone.
>>
>>51895980
What's your alternative?

>>51896062
I used Cloo which makes it very, very convenient.

Had a lot of frustrations with OpenCL itself, up to valid C code simply not compiling with "internal error" being thrown at me; managed to fight it off at the end.

My implementation is multiple times slower compared to the one using CUDA on a GTX970. Not sure how to approach this at the moment.
>>
>>51896465
>you think cloud is a meme too
bwahahahahah, please tell me you're just "pretending"
>>
>>51896471
>account manager
meme-speak for "faggot shoving paper all day"
>>
I am going nuts and/or full retard trying to figure out how to check the eight neighbors of a cell in a 2D array. I have this much but I always get an out of bounds error because I can't figure out how to do bound checking without also fucking up the logic of the counter. Can anyone help me out?
>>
>>51896471
>but I wanted to come in
good goy
>>
>>51896427
To be fair, the opposite of being a wage slave is just being unemployed. But I'm sure you can tell us all the benefits of NEETdom.

>>51896471
There's a very high chance that I have, or will, use your product at some point in that case. Sounds like a pretty good gig. I do architecture pieces on enterprise solutions for a blue chip tech consultancy.

I'm contractually obliged to take all of my holiday every year, and it's bloody hard to take 35 + public holidays, so I'm taking a lot this Christmas.
>>
>>51896502
Lol what? I don't even touch paper. 2015 champ, get with the times.

>>51896512
Must suck hating your job, huh?
>>
>>51896502
Someone has paycheck-envy

>>51896490
Right... Because AWS, Azure, Rackspace, and co are doing so badly. Not like almost everything new being created is cloud hosted or anything.
>>
>>51896525
We're Canadian, so a lot of the business comes from people in the medical or law fields, since data privacy is a major concern for those types of businesses. Since we have data centers only in Canada, and the data is never routed outside of the borders, it's a major selling-point. Unfortunately, if you're American-based, even storing your data in a Canadian data center, I'm almost positive it would still fall under the Patriot Act legislation. You could still store your shit here, but you'd probably be better off using an American company, since a lot of the price for Canadian solutions is based on the data compliances of Canaderp.
>>
>Wage slaves discussing the grind

>>>/biz/
>>
>>51896556
I wasn't aware the U.S. had laws like that. I've ran into similar issues with a German client, Germany's DP law makes it illegal for any personal data to cross their digital border. But I could definitely see that being an advantage, probably useful for financial services too.

The whole concern about transmitting data across a border is a strange one, a lot of it comes down to lawyers not really having a grasp of how the movement of physical and digital data handle location differently.

Arguably, if you're from the U.S., I'd rather have my long turnaround disaster recovery in Canada.
>>
>>51896503
scratch that pic, I only added that garbage at the top to ask someone a question

this is what I've got atm
>>
>>51896601
>Poor fag leaching off his parents with no responsibilities
>>>/toy/
>>
>>51896601
Another one who can't take a wholistic view of their job. If there was no business logic, there'd be no software to develop, and no job for you. So shh. Stop trying to black-white everything.
>>
>>51896621
>>51896624
Monkey want banana?
>>
>>51896663
Fattie want a hotpocket?
>>
>>51896677
yes please
>>
>>51896663
Watch you don't spill your Mountain Dew on your cargo pants kiddo.
>>
>>51896609
...fixed

so how can I bound check this?
>>
>>51896736
i-1 < 0 or i+1 > max

>>51896699
Getting paid to reply to your shitposts is neat.
>>
>>51896765
>i-1 < 0 or i+1 > max
yes but how do I actually implement that without screwing up the logic of the counter?
>>
I'm writing a script in python that mines data. I split html into <li> elements but now I need to take the individual list items and split them further and add them into a dictionary

So for example the list contains items like the following:

<a href="http://www.website.net">Company Name</a>: City, State

<a href="http://www.website.net">Company Name</a>: City, State

<a href="http://www.website.net">Company Name</a>: City, State


I need to make a dictionary consisting of the company name and url so {"company name" : "url} but I can't figure out how.

I've tried everything I just can't figure it out; how the hell do you split the string in that retarded format? How do I just select text between the quote ("http...")?
>>
>>51896811
use an html parser, I'm sure python has something
>>
>>51896811
Don't bother with pattern matching and/or regular expressions and use a proper HTML parser.
http://www.crummy.com/software/BeautifulSoup/
>>
>>51896736
>>51896781

Jesus Christ, this is the CS major meme.

for (int y = max(0, rowPosition - 1); y <= min(height, rowPosition + 1); ++y)
{
for (int x = max(0, columnPosition - 1); x <= min(width, columnPosition + 1); ++x)
{
if (x == columnPosition && y == rowPosition)
{
// skip myself
}
neighbourCount++;
}
}
>>
>>51896838
err, should be a continue in the skip myself part.
>>
>>51896838
>>51896849
I just started programming this week which is why my code is totally retarded

I don't even know what's going on in yours desu
>>
>>51896829

I can't its too fucking complicated to explain at least for me but I can't parse the html directly because the site owner is a cunt who formatted the html retardedly. I have to copy the relevant part (the list section of the site) into a text file and read the file.

>>51896831

I worked with BS but it can't help; the list is > 1000 entries so I get a recursion error whenever I try to parse the html because python quits after 999 recursions.

I can read the entire file in as a string using .text and then read that but the site is retardedly formatted so the list ends up including content that I don't want
>>
File: the_dog_cat.webm (1 MB, 286x520) Image search: [Google]
the_dog_cat.webm
1 MB, 286x520
Ask your beloved programming literate anything.
>>
>>51896878
if you are programming literate why are you here
>>
>>51896481
>What's your alternative?

MainMenu.

>I used Cloo which makes it very, very convenient.

Neat, I'll have to look into it.
>>
>>51896878
Off yourself tetsumi.
>>
Any avatar fags here?

I need pictures of an anime girl with different emotions (very sad to very happy) for something I'm working on.
>>
>>51897058
Just rip something from a visual novel, lel.
>>
File: animegirl.png (5 KB, 512x256) Image search: [Google]
animegirl.png
5 KB, 512x256
>>51897058
Here you go
>>
>>51895078
>&1
why
>>
Fine, if I was to use Beautifulsoup I know how to get the url but how do I go about extracting the company name from:

<a href="http://www.website.net">Company Name</a>: City, State


any ideas? I'm going to make a list of the urls and one of the company names with the indexes matching and then add them to a dictionary based on their indexes
>>
>>51896228
In J*va integers are cyclic, so Integer.MAX_VALUE + 1 = Integer.MIN_VALUE = -Integer.MAX_VALUE - 1. So Integer.MAX_VALUE + (Integer.MAX_VALUE - 1) = -Integer.MAX_VALUE - 1 + Integer.MAX_VALUE - 2 = -3. -3/2 = -1.
>>
>>51897207
>J*va
>>
>>51897116
How much do I owe you?
>>
>Took me 30 minutes to solve a question that'd typically take me 5 in a fucking interview

JUST FUCK MY SHIT UP
>>
File: into the recycling it goes.jpg (6 KB, 183x275) Image search: [Google]
into the recycling it goes.jpg
6 KB, 183x275
>>51897236
>>
>>51897227
700$
>>
>>51897242

FUCK YOU
>>
>>51897287
how much in amerilard dolaroos?
>>
>>51897155
Congrats, you're clinically retarded! Get your certificate at the nearest retard reclamation center!
>>
>>51897387
>I don't know C
m8, you're the retard
>>
>>51897412
The knee is indeed made of iron.
>>
>>51897155
because he doesn't have enough C knowledge to know what it means
>>
>>51897445
swinging past yo' kneeeeees!
>>
>>51897466
Kill yourself faggot.
>>
>>51897470
>found the frequent flyer
how are those bitch miles coming along?
>>
>>51897466
V̢̮̝̊̏̾͒̊ͨ͘͏҉̵̡̤̱͚̘̣̜̪̞̰͈͖̳̞͚̥͈̞̹ͧͥ̓̊̀̆ͭ̎ͯ͛̃ͨͦ͛ͤͬ̓ͣ́̃̚͟҉̥͚̃͛͏̛̙ͩͤ̔̚͞͠͏̱̩̻̠ͨ̀́ͮ͒̅͟҉̴̵̷̴̴̷̧̢̡̧̨̨̼̻͎̮̺̳̣̥̤̣̩̩̥̦̯̫͕̬͖͈̭̫͔͕̺̝̠͇̪̥͎͖̗͕̻̖̼̥̻̫̝̻͙̭̜̦̹͓̫͙̳͈̣̤̦̭̘͖̮̺͚̰̜͈̭̱͇̣̙̣̤̼͔̤͊̑̓̑͊̅̓͗̀͆̅͛͊́̏͋̊ͪ̀̔͐̈͊̑̐͌ͪ̌͆͛͒͊͛̄ͥ̋̆̃̈́̆͐ͭ̔̓̋̔ͥ̊ͫ̇̌͑ͥ̓̔͋̔͒ͭ̂͊̽̐ͣͭ͒̍̀̔ͯͪͯ̃ͨ̊̅ͮ͋̈̅̀͑ͥ͆̓͒̚̕̕̚̚͘̕̕̕͟͜͜͜͜͟͡͞͠͝͝͝͞͞͠ͅͅ͏͒ͨ̑͞҉̴̶̷̧̡̢̛̪͖̖̩̲̺̘̱̦̥̘̯͈͉͕̰͔̭̝̟̺̙͈̪͖͙̥͉͊ͥ̀ͮͤ̄̓̃́ͤ͋̈̍ͥ̌̒̿ͦ́̆ͥ̑̆̾̚̚͜͠͞ͅͅ҉̶̶̴̧̢̧̧̡̨̛̟̹̬̭͇͕͎̜͖͍̳̙̯̳̜̪̫̞͎͉̼͖̣͎̝͓̗̣̘̱̖͎̠̻̰̜̬ͣͫ̄ͬ͌ͪ̒ͤ̒̊͌̉ͭ͂͌͛̆̎̊͒̍͗͛͐̎̑́̽͆ͦͭ̈́̐͜͡͠͞҉̵̥͙̩̭̜̙͈̱̗̈́ͣ̈́̎̿͊ͬ̋҉̸̷̶̸̧̡̧̡̨̡̨̱͕͙͇͍͖̦͓̬͈̫̘̫̘̳̖̺̰̳̣̫̝̠̯̯͓̹̩͚̺̫̙͉̺̯̣͖̤͙̥̫̙̪͙̠̪̪̺̩̟̖͉͊̆̓͊͌̿ͩ̀ͫͯͣ̑̽̋̌̾ͧ̓̏̐̉ͪ̍̈́͑ͨ̇͊͑̿ͭ́̆̏͋̍̈́̍̇̈̾ͩ̏̈̄̓͑̋́ͩͪ̌ͮ̓̾̽́̎͌ͣͮ͊̌̾ͬ̅ͥ̊̅̔͛̇͊͋̾̏̃̏ͥ̍ͮ̕͘̚͟͟͟͟͟͜͡͝͠͞ͅ҉̵̢̢̨̨̡̢̰͖̤͓͈̻̠͖͙̱͙̹̼̮͚͓͉ͤ̇͌ͨ̽ͯͫ͑͌͆̍̏ͥ̀̂̇ͩ͒̚͘͟͟͡͝͞͡͏̸̷̶̧̡̨̩̣̙̯͇̗̠͖̗̠̠͎̣̮̮̙̞̳́̀ͧ̆̔͗ͤͬ̀̇̎ͧ̀͑̇̐͌̀̑̀̍͒ͤ̔̇͂͋͌͋ͨ͘͘͢͜͞͞҉̵̨̱̰̯͇̑̔̓͏̡̗̲̊̈́́͝҉̸̸̢̨̛͈͇͚̗̬̲̮̞̰̙̫̠̯͍̫̗̜̺̻̼͍̺̣͙̌̌ͭ͌ͫ̊̔͋̋̂̊ͤ̿̈͒ͪͧ̂ͭ̓̎̊̈́̀͞͞҉̴̵̙̖͉̗̳͉̩̦̲̲̮͔̫͎͔̮̖ͩ̈́̿͑̍̒̑̀̐̀ͬ̈͐͊̈̎̈̔̄́͢͞҉̨̧̤̬͔̤ͦ̌̍̃̈́́҉̢͉͖̥̊̌̂̒͂̈̐̒ͯ̾͢͞͏̵̷̨̢̤̻͚̞͍̟͖̯̳͕͇̲̖̠̭̭̱̮͕͕̖̼̼̘̥͉͕̩̩̟͇̾̃̓͒̎̌̏̃̉͛̀̽͒̇ͭ́̔̇̅̍̒ͥ̓͆͋̅̊̄̊ͪͥ̀̊͛͐ͣ̒ͥͬ̉͢͢͝͝͝͠͏̷̧͍̻̼̭̬̳̮̘̱̺͙̘͗̌̊
Kill yourself, faggot.
>>
File: ruff victory.jpg (58 KB, 620x465) Image search: [Google]
ruff victory.jpg
58 KB, 620x465
who here /dog petting thread/
shitpaws need not apply.
>>
>>51897513
Look, fuckstick, I'm incredibly busy. So why don't you get the hell out of here before I snap your dick off and jam it into your ass.
>>
>>51897552
>big dick playa
>dick swinging past yo' kneeeeees!
>30 years of experience with C
>can't average two ints
>doesn't have a job
Commit seppuku, faggot.
>>
>>51895675
Are you deliberately trolling?
>>
>>51895675
>K&R can't average two ints without overflow

it all comes tumbling down
>>
>>51897567
First, take a big step back... and literally, FUCK YOUR OWN FACE! I don't know what kind of pan-pacific bullshit power play you're trying to pull here, but Asia, Jack, is my territory. So whatever you're thinking, you'd better think again! Otherwise I'm gonna have to head down there and I will rain down an ungodly fucking firestorm upon you! You're gonna have to call the fucking United Nations and get a fucking binding resolution to keep me from fucking destroying you. I'm talking scorched earth, motherfucker! I will massacre you! I WILL FUCK YOU UP!
>>
>>51897552
imdb.com/character/ch0100777/quotes

>Studio Executive Rob Slolom: Swinging past ya knees!
>Les Grossman: ... Oh yeah! Playa... playa! Big dick playa!
>Les Grossman: Look, fuckstick, I'm incredibly busy. So why don't you get the hell out of here before I snap your dick off and jam it into your ass...
Damn, "Average Two Ints: The Movie"
>>
>>51897621
>it's been 4 weeks
>google searches finally paid off
you did it, anon!
>>
I'm doing a personal project that involves 4chan post classification. What's your favorite python site crawler, /dpt/?
>>
>>51897638
It was obvious pasta. I didn't think "big dick playa" and "swinging past ya knees!" was.
>>
>>51897638
Also know as a month.
Such a massive kike.
>>
>>51897658
>all months are february
m8...
>>
>>51897639
>memes
>animu
>traps
done
>>
Okay I have the following query:
SELECT `id`, `data` FROM `dataset` WHERE `owner_id` = <owner_id> LIMIT <offset>,<perpage>;


How would I also query the number of total entries associated with that owner_id within the same query and without nested queries?
>>
>>51897696
ye, but the idea is to use a clustering algorithm to see if it can pick up on posts with common themes (ie identify memeposts). The alternative would be to use supervised learning, but that would require me sitting down and labeling posts to create training data, and I'm way too lazy for that, plus I think it'd be a bit too limited as something trained on /int/ posts would probably do poorly on /g/ posts, for example.
>>
>>51897750
Intead, train it on /wdg/ and /wt/ and it will do great on /g/!
Thread replies: 255
Thread images: 16

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.