Jump to content

TizzyT

Member
  • Posts

    66
  • Joined

  • Last visited

Reputation Activity

  1. Like
    TizzyT reacted to LukeTim in Programmers Lounge   
    I don't know what is going on.
  2. Like
    TizzyT reacted to fizzlesticks in [Problem Solving #1] Deletable Primes   
    It takes ~.8 seconds with a 660ti as it was written in that post, which is about double what @Ciccioo 's solution takes. By using a sieve to calculate primes on the CPU then sending the rest of the problem to the GPU takes it down to about .4 seconds. It's not really a great problem for comparing parallel to serial because the serial algorithm is just so much more efficient than the parallel version because it takes advantage of previously calculated values.
  3. Like
    TizzyT reacted to fizzlesticks in [Problem Solving #1] Deletable Primes   
    A bit overkill for the problem but cuda ftw
  4. Like
    TizzyT got a reaction from wolfsinner in [Problem Solving #1] Deletable Primes   
    Thanks a lot but you didn't have to since it was my fault for being an idiot . Sorry about that will keep in mind for future submission and thanks again.
  5. Like
    TizzyT reacted to wolfsinner in [Problem Solving #1] Deletable Primes   
    I deleted the incorrect submissions since it was a matter of formatting. All problem results end with a line break, keep that in mind from now on.
     
    Good job, I encourage you to keep going!
  6. Like
    TizzyT reacted to ThreePinkApples in What Am I doing wrong? DisplayMybelowAverage Is the Problem:   
    foreach (int val in scoresArray) you are using int there, but the scoresArray is a double array
  7. Like
    TizzyT got a reaction from wolfsinner in [Problem Solving #1] Deletable Primes   
    OHHH lol I need to press enter again for the second line as well.....FML all those "incorrect"s lol
    Sorry
     
    COMPLETE LACK OF ABILITY TO FOLLOW DIRECTIONS!!! lol my bad
     
     
    Code: VB.net
     
    Code: C#
  8. Like
    TizzyT reacted to Ciccioo in [Problem Solving #1] Deletable Primes   
    i think that they both should work, but i usually go with manually pressing enter, so you should be safe using that method
  9. Like
    TizzyT reacted to Darko_Nerivar in Is it difficult to learn C after learn C# ?   
    Woah-woah-woah. A driver? Don't you think that is way too harsh?
  10. Like
    TizzyT reacted to AlwaysFSX in Is it difficult to learn C after learn C# ?   
    No, it's just a little bit more complicated. Things aren't as streamlined.
  11. Like
    TizzyT reacted to Ciccioo in [Problem Solving #1] Deletable Primes   
    mmm they look right to me
    the number of primes is correct, the last few primes and the first few primes are correct too, so you should be good
    be careful to put a line break after each of the two line when you submit your solution
  12. Like
    TizzyT reacted to fizzlesticks in [Official][Update 8/15] Linus Tech Tips API   
    Yes it is JSON and here's a quick Python script for logging in and calling the new API, it doesn't do any error checking and I don't know if the "auth_key" ever changes.

    import urllib, urllib.request, http.cookiejar, time, jsonuser = '<your username>'password = '<your password>'loginURL = 'https://linustechtips.com/main/index.php?app=core&module=global&section=login&do=process'apiURL = 'http://linustechtips.com/main/page/api.php'cj = http.cookiejar.MozillaCookieJar()opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj))opener.addheaders = [('User-agent', 'Opera/9.80 (Windows NT 6.1; WOW64; U; de) Presto/2.10.289 Version/12.01')]login_data = urllib.parse.urlencode({'ips_username' : user, 'ips_password' : password, 'auth_key' : '880ea6a14ea49e853634fbdc5015a024', 'referer' : 'http://linustechtips.com/main/', 'rememberMe' : '1'})resp = opener.open(loginURL,login_data.encode('utf-8'))while True: resp = opener.open(apiURL) text = resp.read().decode() resp.close() js = json.loads(text) print('User name: ' + js['display_name']) print('New notes: ' + js['new_notifications']) print('New pms: ' + js['new_pms']) time.sleep(5)
  13. Like
    TizzyT got a reaction from Maximation in How old were you when you started programming?   
    Hmm I started messing with HTML and JS simetime in 7th grade (~13 years old) and thought at the time, "oh yeah... I know programming" lol. Later I thought "I want to make something that isn't a webpage or ran in a browser" so I went to youtube in 9th grade to try to learn C/C++. I failed miserably at the time and looked for an alternative that I could grasp but was still able to achieve what I wanted. Found something called RealBasic. Dabbled in that for a week, then I found VB. At the time I was very ignorant about anything programming and while looking up tutorials for VB I mistakenly and unknowingly learned VB.net (VB6 vs VB.net, I didn't know at the time since the search term I used was simply VB with no specifics and thought .NET was just part of an address). Throughout highschool I learned and did more vb.net. After highschool I went into networking at Pennsylvania Institute of Technology and we had a JS class that thaught me much more about JS (before I just mostly modified code). Learning to write JS gave me a grasp on the syntax schemes which varied among languages, with that I thought I can tackle C/C++ again but I didn't take the plunge until right before I started my programming class at Devry University (DO NOT go there, they are rip off artists and a horrible school which I later dropped out of). Before classes started I somewhere somehow got the motivation to look into tutorials and in about a week I learned most of the basics etc (no classes or interfaces etc, mostly creating functions, some math and output). I did very well in the C++ class imo and provided help to anyone in the class that was struggling or just needed the help via skype (got in trouble because on some assignments the code of the people I helped was similar to mine, and I was asked to stop helping). After I dropped out a friend of mine was still in school and was learning java and he asked for some help. I knew nothing of java and he said (probably jokingly) "learn it" and I did lol. Ofc not java as a whole, I learned the basics etc and just brought over what I knew from VB and C++. While helping him I usually write everything in VB and then converted the logic over to Java afterwards (when I can), it was an inefficent way but at the time it was hard for me to just jump right into java. Even today I write most things in VB because I am most comfortable in it and it does what I need. The only problem my friend had was my VB source and to make things easier I rewrote in C# sometimes. I want to dabble into x86 one day and ARM even though I hate it (for no legitimate reason lol). I am now 23 and while I like programming I cant say I am a very fast learner of it nor good at it but I do it as a hobby and I learn more by finding problems and googling on how to fix them or wanting to implement a feature I don't know how to yet.

    PS: I forgot to mention I learned R to help a friend in some bio-chem stuff. Its a useless language imo and also dabbled in D for a bit out of curiosity (will probably be my main language in the not so near future).
  14. Like
    TizzyT got a reaction from fletch to 99 in The under 100 line challenge!   
    Here is one in VB I made today for a friend and remembered this thread, Don't know if VB is valid but here it is:
    www.mediafire.com/download/2u84oerqc2aooa8/FlipsHorizontal.zip
    He wanted me to teach him how to flip an image horizontally because his camera captures it flipped the wrong way, so instead I made this.
     
×