[QUOTE=supervoltage;52612452]Yeah I'm pretty new to the practical side of C++. I followed the entirety of [url]www.learncpp.com[/url] as a quick-start way of gaining knowledge of what you can do (I liked the pace it explained C++ concepts very much - not too slow, not too fast) and am now trying my hand at building some software for my job to make my and my colleagues' lives easier. The only problem I have now is applying all the bits and bobs I know of C++; to build a foundation of practical knowledge, which understandably comes with time and practice.
This is the first endeavor in actually making something useful out of my new skill. Hopefully, one day, I will become the software developer I always wanted to be and escape this monotonous 1st line support job. One day...[/QUOTE]
[URL="https://drive.google.com/file/d/0B7x7Ml9OlXAda0Jqa0tIdzIzbGs/view?usp=sharing"]Here's a link[/URL] to the C++ Primer from my google drive. I'd recommend this over learncpp: its not bad, but C++ Primer covers C++11 in-depth which is really nice. LearnCpp seems to cover some of it, but it has (understandably) less to it than the textbook. Its a biiiig book but it has lots and lots of useful info (I still keep it in my desk and refer back to it), and the exercises it recommends are quite good. If you can afford it, a physical copy can be nice (but pdf works fine, too).
The various exercises will help you start building the things you need to complete the application you're working on, too. I'd also recommend trying some personal fun projects that interest you, be it in personal utilities or game related projects.
I guess this is the right place to ask this, or maybe the webdev thread? I'm trying to write a url shortener in nodejs express but sometimes it can't read the array of urls and sees it as undefined? only fails when I upload the server to google cloud, works fine locally.
Here's the redirect code
[code]
app.get('/:encoded_id', function(req, res){
var hash = req.params.encoded_id;
if (Globals.Url[hash]) {
var url = Globals.Url[hash];
if (!url.startsWith("https://") && !url.startsWith("http://")) {
url = "http://" + url;
}
res.redirect(url);
} else {
res.send("Failed to find destination. " + hash + ": " + Globals.Url[hash]);
}
});
[/code]
and here's the url generator
[code]
router.post('/', function(req, res, next) {
var hash = sh.unique(req.body.url);
if (!Globals.Url[hash]) {
Globals.Url[hash] = req.body.url;
res.send({shorturl:"https://links.lumaio.club/"+hash});
} else {
res.send({shorturl:"https://links.lumaio.club/"+hash});
}
});
[/code]
Globals.Url is just defined as
[code]
var Globals = {
"Url": {}
};
[/code]
If you want to see what I'm talking about exactly go to [URL]https://links.lumaio.club/get_url_list[/URL] and refresh a bunch. my only guess is that this has something to do with the async/multhreading in express but I have no idea.
[sp]box me if im being an idiot[/sp]
[QUOTE=Lumaio;52614666]I guess this is the right place to ask this, or maybe the webdev thread? I'm trying to write a url shortener in nodejs express but sometimes it can't read the array of urls and sees it as undefined? only fails when I upload the server to google cloud, works fine locally.
Here's the redirect code
[code]
app.get('/:encoded_id', function(req, res){
var hash = req.params.encoded_id;
if (Globals.Url[hash]) {
var url = Globals.Url[hash];
if (!url.startsWith("https://") && !url.startsWith("http://")) {
url = "http://" + url;
}
res.redirect(url);
} else {
res.send("Failed to find destination. " + hash + ": " + Globals.Url[hash]);
}
});
[/code]
and here's the url generator
[code]
router.post('/', function(req, res, next) {
var hash = sh.unique(req.body.url);
if (!Globals.Url[hash]) {
Globals.Url[hash] = req.body.url;
res.send({shorturl:"https://links.lumaio.club/"+hash});
} else {
res.send({shorturl:"https://links.lumaio.club/"+hash});
}
});
[/code]
Globals.Url is just defined as
[code]
var Globals = {
"Url": {}
};
[/code]
If you want to see what I'm talking about exactly go to [URL]https://links.lumaio.club/get_url_list[/URL] and refresh a bunch. my only guess is that this has something to do with the async/multhreading in express but I have no idea.
[sp]box me if im being an idiot[/sp][/QUOTE]
Google maybe scales your server up to multiple processes, that's why it works locally and not on the Google servers. Is there some kind of "process count" when you visit the Google cloud dashboard? Ideally, you would switch to a simple and fast database like redis etc., So your data is not in the server itself
I don't think google does that. in any case I switched to using a database and it seems to be working now but I'm still confused as to why it wouldn't before. Guess it's not that important, thanks for the help
Anyone familiar with GLSL here?
I'd like to save a few values per vertex for use in the next frame. These values will never be accessed during the current shader execution, and never accessed by other vertices.
[QUOTE=IpHa;52618974]Anyone familiar with GLSL here?
I'd like to save a few values per vertex for use in the next frame. These values will never be accessed during the current shader execution, and never accessed by other vertices.[/QUOTE]
Maybe transformation feedback?
[QUOTE=IpHa;52618974]Anyone familiar with GLSL here?
I'd like to save a few values per vertex for use in the next frame. These values will never be accessed during the current shader execution, and never accessed by other vertices.[/QUOTE]
why do you need these values, and what are you using them for? This is not usually something I would imagine being performance friendly, or worth the amount of work it'll probably be.
[QUOTE=Karmah;52619560]Maybe transformation feedback?[/QUOTE]
Does transform feedback stay in the GPU, or does it have to be copied out?
[QUOTE=paindoc;52619565]why do you need these values, and what are you using them for? This is not usually something I would imagine being performance friendly, or worth the amount of work it'll probably be.[/QUOTE]
I'm making an FFT based audio visualizer. The FFT is run on the the CPU, separated into bars, and smoothing applied.
I'm trying to move the smoothing part(which requires previous data for gravity/falloff) to shaders. I don't expect any performance improvement from this •– it's just a pet project to see how much I can do in shaders and learn opengl.
[QUOTE=IpHa;52619672]Does transform feedback stay in the GPU, or does it have to be copied out?
I'm making an FFT based audio visualizer. The FFT is run on the the CPU, separated into bars, and smoothing applied.
I'm trying to move the smoothing part(which requires previous data for gravity/falloff) to shaders. I don't expect any performance improvement from this •– it's just a pet project to see how much I can do in shaders and learn opengl.[/QUOTE]
General compute tasks are usually done with compute shaders nowadays - you can use shader storage buffers to upload whatever data you need as well as to write your data output into.
So my lab software had a timer that ran a function to check my database for new orders. It suddenly stopped working and I've tried moving it around to see if that would fix it.
Here's the function I'm trying to repeat every 10 seconds:
[code]
def check_new_orders(self):
# perform the order check every ten seconds
self.timer = Timer(10, self.check_new_orders)
# queries the database for new orders
query = session.query(Order).filter(Order.isNew == 1).all()
if not query:
pass
else:
for order in query:
orderdict = order_to_dict(order.orderid)
if STATION_HAS_PRINTER:
print_order_label(orderdict)
else:
msg = no_printer()
msg.show()
setattr(order, 'isNew', 0)
session.commit()
self.set_counters()
self.alert_new_orders()
fill_recents_table(self)
fill_orders_table(self)
self.archive_old_orders()
self.timer.start()
[/code]
I can see the thread running and restarting every ten seconds which is fine, but it's not executing anything in the function.
Aside from using a debugger, can you put print statements in each code path to see if it is really executing anything?
I would guess the most likely candidate is that the query object is not getting retrieved correctly, and it passes on each loop for that reason.
[QUOTE=Protocol7;52622737]Aside from using a debugger, can you put print statements in each code path to see if it is really executing anything?
I would guess the most likely candidate is that the query object is not getting retrieved correctly, and it passes on each loop for that reason.[/QUOTE]
I can tell if it's being executed properly by just manually setting an order in the database to new and then waiting for the alert sound. It is now being executed properly and the threads are stopping and restarting correctly but now they're never stopping. I'm using PyQt which allows you to override the closeEvent method to execute a function when the main window is closed. That has now stopped working and the timer never stops.
hello i just graduated with a bachelor in it, major in software development, except i cant get a job anywhere because they want a bunch of formal experience and the only experience i have is personal projects that i no longer have, other personal projects i didn't bother keeping because they were just small programs and my university experience (which is vast as you could imagine, but i have retained all the right info and skills).
for those of you who found a way into the industry, where do i begin? i've just been throwing resumes at companies with openings despite not technically being what they are asking for.
[QUOTE=Pat.Lithium;52625109]hello i just graduated with a bachelor in it, major in software development, except i cant get a job anywhere because they want a bunch of formal experience and the only experience i have is personal projects that i no longer have, other personal projects i didn't bother keeping because they were just small programs and my university experience (which is vast as you could imagine, but i have retained all the right info and skills).
for those of you who found a way into the industry, where do i begin? i've just been throwing resumes at companies with openings despite not technically being what they are asking for.[/QUOTE]
Keep applying, and in the meantime work on portfolio projects in relevant languages/skills.. Companies (over here at least) start drooling over anyone who contributes to open source projects, or who have good sample work that they can show. IMO throwing away your university work / personal projects was a mistake if you don't have other work/experience to show.
I'm learning Rails, almost done with the Ruby on Rails Tutorial,, what ideas can you guys throw at me for a small project to get acquainted with the language? It might set me up with an internship, so something that would require a display of beginner-intermediate knowledge would be great
[QUOTE=NixNax123;52626699]I'm learning Rails, almost done with the Ruby on Rails Tutorial,, what ideas can you guys throw at me for a small project to get acquainted with the language? It might set me up with an internship, so something that would require a display of beginner-intermediate knowledge would be great[/QUOTE]
I would shoot for something with more than one model and also an integration with some API. This shows some good skills on its own. Also, many people seem to worry about creating something earth shattering like the pied piper algorithm, but dont worry about that. Just create something that is relevant to you and interests you, that way when you talk about it in an interview, the interviewer will see your passion for it and you'll have tons to talk about.
If you want to contribute to open source projects, it helps to make a tool you use better. Its hard to just go on GitHub and find a project and start contributing. If you use the tool you want to contribute to, you'll know how it works better. So start by using tools that YOU use and that will benefit you (and probably many others)
[editline]29th August 2017[/editline]
[QUOTE=Pat.Lithium;52625109]hello i just graduated with a bachelor in it, major in software development, except i cant get a job anywhere because they want a bunch of formal experience and the only experience i have is personal projects that i no longer have, other personal projects i didn't bother keeping because they were just small programs and my university experience (which is vast as you could imagine, but i have retained all the right info and skills).
for those of you who found a way into the industry, where do i begin? i've just been throwing resumes at companies with openings despite not technically being what they are asking for.[/QUOTE]
I got my first job by bloating some of the personal projects I had made in school dude. I put them up on GitHub and put 4 projects I had as "Relevant Work Experience". Beyond that I had NO experience besides the degree which isn't much. The company that I work for now took a chance on me and I still work here 2 years later.
If you have zero experience, personal projects will be your best bet.
[QUOTE=SataniX;52625643]Keep applying, and in the meantime work on portfolio projects in relevant languages/skills.. Companies (over here at least) start drooling over anyone who contributes to open source projects, or who have good sample work that they can show. IMO throwing away your university work / personal projects was a mistake if you don't have other work/experience to show.[/QUOTE]
yeah i never meant to throw it all away, just went through a couple computers while i was at uni and have little left. actually when i was in my second year i did a 3d graphics course where we coded up a 3d rendering system from scratch in c++, and it was a lot of fun but i didn't retain any of it so i always wanted to revisit that idea and expand on it.
i do think i have a couple things on my google drive so i'll start there, then i had some great project ideas to work on in the mean time while i'm applying for jobs.
[editline]30th August 2017[/editline]
[QUOTE=brianosaur;52626997]I got my first job by bloating some of the personal projects I had made in school dude. I put them up on GitHub and put 4 projects I had as "Relevant Work Experience". Beyond that I had NO experience besides the degree which isn't much. The company that I work for now took a chance on me and I still work here 2 years later.
If you have zero experience, personal projects will be your best bet.[/QUOTE]thanks mate, this is the kind of stories i like to hear. while i was in uni i kept telling myself i gotta start putting a portfolio together but i never did.
[QUOTE=Pat.Lithium;52625109]hello i just graduated with a bachelor in it, major in software development, except i cant get a job anywhere because they want a bunch of formal experience and the only experience i have is personal projects that i no longer have, other personal projects i didn't bother keeping because they were just small programs and my university experience (which is vast as you could imagine, but i have retained all the right info and skills).
for those of you who found a way into the industry, where do i begin? i've just been throwing resumes at companies with openings despite not technically being what they are asking for.[/QUOTE]
Internships? Go to a university career fair and look for internships/entry level work. Also consider applying for jobs in the United States if you're willing to relocate. Look in and around San Francisco, New York, and Washington DC areas
[QUOTE=Pat.Lithium;52629162]yeah i never meant to throw it all away, just went through a couple computers while i was at uni and have little left. actually when i was in my second year i did a 3d graphics course where we coded up a 3d rendering system from scratch in c++, and it was a lot of fun but i didn't retain any of it so i always wanted to revisit that idea and expand on it.
i do think i have a couple things on my google drive so i'll start there, then i had some great project ideas to work on in the mean time while i'm applying for jobs.
[editline]30th August 2017[/editline]
thanks mate, this is the kind of stories i like to hear. while i was in uni i kept telling myself i gotta start putting a portfolio together but i never did.[/QUOTE]
oooohhh, if you're looking for 3D graphics work I've got a few recommendations up front on how to get up to speed. First, make sure to start [I]really[/I] leveraging modern C++ features: in [URL="https://github.com/fuchstraumer/VulpesRender"]my rendering engine[/URL], I've made ample use out of std::unique_ptr since it lets me precisely manage initialization and destruction order, gives me more memory safety, has little overhead, and still lets me manually destroy things as needed. Modern C++ has proven really useful in tons of places for me, especially the super-new [URL="https://gist.github.com/fuchstraumer/98e99682e0dcd8399003f2c80ae5ada0"]Filesystem stuff[/URL] and the improved concurrency API (from std::async to the new parallel algorithms). I've hardly even touched the improved TMP elements, std::any, std::variant, etc, too. Here's a [URL="https://drive.google.com/file/d/0B7x7Ml9OlXAdZkw0R1kwYm8wMGs/view?usp=sharing"]neat paper I found on someone designing a rendering engine[/URL], may or may not be of help. The Physically Based Rendering Technology book is quite good, and so is "Fundamentals of Computer Graphics". PM me for links to those, if you'd like them. I'd also recommend getting into the more verbose APIs: Vulkan and DX12, namely. If you can use these you can easily use earlier versions of DirectX and/or OpenGL. If this seems too daunting, at least try to use as much Direct-State-Access stuff as you can with OpenGL, since that increases performance and can help prepare you for more advanced APIs. When it comes to graphics stuff, you'd also be well-off to do things that aren't just game demos: simulations, visualization aids, and CAD-a-like things are all things that I've had to build in my workplace (which is not [I]at all[/I] gamedev related). Plus, having to make my rendering engine able to do all of these things AND work for my personal projects honestly just made it better. And I got to work on my rendering code at work, and get paid to do so :v:
In general I've got piles of textbooks, including the pdf version of C++17 STL Cookbook and Effective Modern C++. I'm not sure on what the policy on linking such things is, even if I paid for them, so PM me if you'd like links to anything and I'll give you a drive link to them. Getting hired is a scary process: I'm lucky in that I worked somewhere as an intern, then part-time when school fell apart, and now full-time once school completely fucked off (though, I kinda made it fuck off). I wouldn't be here if it wasn't for the grace of others giving me a shot, but having my portfolio of past work and doing lots of GPU computing stuff actually proved hugely beneficial in my psuedo-interview with the software team at my workplace. It changed my prospects from "probably can hire" to "probably should hire". Try to contribute to open source projects, too, by creating pull requests. Familiarize yourself with CMake and writing CMakeLists, use different build systems, play with Linux development, and make sure to know Git fairly well. Start looking for positions abroad too, but know that the Visa process can be super tough and you'll have a harder time getting considered for interviews and such because of that.
Just don't ditch code! Put all of your code either in a drive, or (even better), in some kind of version control. Bitbucket gives you five private repos, Github gives you unlimited if you setup and educational account. I throw all my projects up, no matter how small, because I never know when they'll be useful. I've also deleted repo's and regretted not having a hard backup around, so consider archiving local copies too before really cleaning up. This is more for your use than for employment stuff, though, as I've pulled tons of useful code snippets from other projects.
Does any have a simple explanation for Haskell Monads? I am having a difficult time understanding.
[QUOTE=paindoc;52630537]Just don't ditch code! Put all of your code either in a drive, or (even better), in some kind of version control. Bitbucket gives you five private repos, Github gives you unlimited if you setup and educational account. I throw all my projects up, no matter how small, because I never know when they'll be useful. I've also deleted repo's and regretted not having a hard backup around, so consider archiving local copies too before really cleaning up. This is more for your use than for employment stuff, though, as I've pulled tons of useful code snippets from other projects.[/QUOTE]
I'll add my two cents to this.
While version control systems are great for projects, they can be cumbersome when you only want to write snippets of code.
For that, I use GitHub Gist, although any service that lets you save code will do.
I have plenty of snippets lying around that I use for new projects.
[QUOTE=Pat.Lithium;52625109]hello i just graduated with a bachelor in it, major in software development, except i cant get a job anywhere because they want a bunch of formal experience and the only experience i have is personal projects that i no longer have, other personal projects i didn't bother keeping because they were just small programs and my university experience (which is vast as you could imagine, but i have retained all the right info and skills).
for those of you who found a way into the industry, where do i begin? i've just been throwing resumes at companies with openings despite not technically being what they are asking for.[/QUOTE]
If you're struggling then try a recruiter - they'll find you a job (hopefully) at no cost.
Once you're in you're in - it's a growing industry and when you've got some experience under your belt the world is your oyster.
Once you've been at your first job for about a year you start getting fucking bombarded by recruiters on LinkedIn. Most of them are shitty offers but hey, it's pretty much the opposite of what you start off with.
[sp]please help[/sp]
[QUOTE=elevate;52632092]I'll add my two cents to this.
While version control systems are great for projects, they can be cumbersome when you only want to write snippets of code.
For that, I use GitHub Gist, although any service that lets you save code will do.
I have plenty of snippets lying around that I use for new projects.[/QUOTE]
Totally forgot to mention this, despite using it a ton. Gist is pretty neat (though, this post reminded me to clean up my old useless gist snippets/clutter tbh)
[QUOTE=Pat.Lithium;52625109]... the only experience i have is personal projects that i no longer have, other personal projects i didn't bother keeping because they were just small programs and my university experience (which is vast as you could imagine, but i have retained all the right info and skills).[/QUOTE]
If you plan on doing more projects to help build up your portfoilo, I'd strongly suggest the same thing paindoc did about using GitHub or BitBucket. All of the projects I'd want people to see can be found on my GitHub, and most of the time I remember to commit and push working changes. For working with repos, I prefer to use Atlassian Source Tree because it's incredibly easy to use and besides a couple of present bugs, works great!
As for locally storing the data, I put them inside of a folder called "C:\Dev\Code\Projects". Easier to keep everything organized that way. Best of luck to you!
So, I'm playing around with drawing on a C# windows form...
I have a 4k monitor.
If I get the co-ordinates of my mouse relative to my screen corner it actually reports as:
2559 x 1439 (2560 x 1440) Fair enough, I have an application scale of 150% That is to be expected (1.5* said numbers are the 4k resolution)
Now,
I've drawn my panel to be the size of 1200 x 700 px.
However, the drawn graphics on the panel seem to be at a different scale.
[img]https://i.imgur.com/MPpMiGi.png[/img]
Each block is 50 px relative to the 150% applications scale.
This scale doesn't seem to effect the window scale itself? (1200x 700)
What would be the best way to fix this in a non hacky way?
[QUOTE=paindoc;52630537][...] Bitbucket gives you five private repos, [...][/QUOTE]
Bitbucket gives you unlimited private repos, but there's a five user limit (in total I think) on collaborating on them.
It also supports Mercurial, which is a ton nicer than Git in almost all aspects. Part of it is personal preference though.
[QUOTE=Tamschi;52639194]Bitbucket gives you unlimited private repos, but there's a five user limit (in total I think) on collaborating on them.
It also supports Mercurial, which is a ton nicer than Git in almost all aspects. Part of it is personal preference though.[/QUOTE]
I found mercurial had some performance issues on larger projects which is why I had to swap from mercurial to git, using a gui there's very little difference between them
[QUOTE=Icedshot;52640389]I found mercurial had some performance issues on larger projects which is why I had to swap from mercurial to git, using a gui there's very little difference between them[/QUOTE]
I tend to have the opposite issue :v:
It's probably really system specific, because Git opens tons of processes while Hg is written in Python.
Trying to build my Jekyll based website. But getting the following error:
[code]jekyll 3.0.1 | Error: undefined method `map!' for nil:NilClass[/code]
Any idea? bundle exec jekyll build doesn't work either.
Sorry, you need to Log In to post a reply to this thread.