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

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 35
Thread images: 5

File: c.png (200KB, 448x648px) Image search: [Google]
c.png
200KB, 448x648px
What are you working on, /g/?

Previous thread: >>61672457
>>
>want to program
>i don't have any big project goals or any idea about what I want to program
fookin kill meh
>>
Trying to learn python
>>
I have an array with different keys/values for a business. Like so:
>name => John's Pizza
>bussiness_manager => John
>etc

However, these two pieces of info (and more) go into two different tables, how do I properly separate the information into different arrays?
I was thinking of having an already existing array with the column names of the tables and loop through them to see if they match the POST array. Is this good.
>>
>>61683752
try >>>/g/wdg
>>
real bread (now with dubs)

>>61683744
>>61683744
>>61683744
>>
>>61683779
And without anime shit.
>>
>>61684587
>hating on anime
>on an anime website
Reddit pls
>>
File: 1501642093787.jpg (109KB, 858x1057px) Image search: [Google]
1501642093787.jpg
109KB, 858x1057px
>>
>>61683732
why.jpg
>>
>>61683686
>allahu akbar
>???
>BOOM
>>
>>61686819
>Profit!
>>
>>61683686
>Too lazy to start over
>>
>>61683686
How do I become master programmer in a short time, /g/?
>>
File: 1443382950329.png (440KB, 633x758px) Image search: [Google]
1443382950329.png
440KB, 633x758px
Does anyone know an environment/software that would let me build arbitrary text files out of parameterizable snippets?

Something like:
"Bob has a $COLOR car." where I assign value "red" to the $COLOR and the final output file will be "Bob has a red car."

I would like these snippets to be managed by a central library - meaning if I change content of a certain snippet it will change in all the files I am using it [multiple file support].

Also I need those snippets to support nesting - meaning one snippet containing pointers in its content to other snippets and so on.

Anyone knows a solution that could help me out here or at least something as close as possible? I mostly want to generate XML files with this but not always, sometimes content and syntax of those files will be completely custom and arbitrary.
>>
Keep the anime OP image. If someone has a problem with anime, it's likely they are not programmers and are here to bikeshed. There is a strong correlation between liking anime and being a programmer. Actual scientific fact.
>>
>>61688884
anime isn't even that of a big deal it's the muslim shit that some anon keeps spamming like the trapfag did with himegoto
>>
>>61683686
I have stats in my Engineering course and have to learn R

Redpill me on R
>>
>>61690230
Yeah I see your point, I'm Muslim myself (not OP obviously) and even I don't want Muslim crap in my /dpt/. Tech is where I go to escape all this religion/political shit.
I want the spinning sicp girl back.
>>
File: IMG_1136.jpg (91KB, 634x795px) Image search: [Google]
IMG_1136.jpg
91KB, 634x795px
>>61683686
Let's post problems and solutions, it'll be fun. I'll start:
>a method/function/procedure
>write a method/function/procedure that takes an int n and returns true if n is even. The method cannot use the multiplication, modulus, or division operators

Here's my solution
boolean isEven(int i) {
while(i>0)
i-=2;
return i==0;
}
>>
stupit muzzies
>>
>>61693819
Here's a better one:

boolean isEven(int i) {
return (((i>>1)<<1) == i);
}
>>
>>61695150
damn, not bad
>>
>>61688848

PHP -> Twig
Python -> Jinja
Ruby -> erb
Elixir ->eex
>>
>>61695150
nice UB
>>
>>61691483
It's bretty gud but in the real world you'll be using SAS and SPSS really.
>>
>>61688084
it depends?

are you virgin?
>>
>>61693819
>>61695150
What language is this?
>>
>>61697030
Does it matter?
No. I've used an onahole once.
>>
>>61693819
The data type is trivial, use void instead.
>>
>>61697242
Java.
>>
>>61698693
>>61693819
boolean isEven(int i) {
return Integer.numberOfTrailingZeros(i) > 0;
}
>>
Wondering why I'm hungry, have little money, unemployed and basically homeless.

Do you know what it's like and what it makes you feel like not eating much?


Richard
fbfounderNative
>>
My curiosity can't be contained anymore, I want to learn a functional programing, but I'm not sure which one to go with. I'm thinking I should learn something practical and actually useful but I'm not sure if any functional language exists that is both useful and much different from a procedural language, if that's the case then I'd rather go all in and use something that may not have a practical application but may have an educational one, one that will force me to use a different style and tackle problems in a way I'm not familiar with.

In either case could people recommend me languages for both? i.e.
Practical: X, Y, Z
Academic: A, B, C
Y is good for... B is interesting because...

I would appreciate it.
>>
>>61695150
Would be quicker to just bitwise AND with 1.
Thread posts: 35
Thread images: 5


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.