[QUOTE=war_man333;52564362]Open-Source/github question.
What would be a way of having assets I paid for but still having an open source repository?
Maybe open source the code but not the whole repo?[/QUOTE]
You could use a [URL="https://git-scm.com/docs/gitignore"].gitnore [/URL]file to ignore the paid for stuff, but still keep the folder names so people know what to purchase
[QUOTE=tschumann;52564007]Not sure how Source works but Half-Life's looks simple enough (or at least the game code part of it does).
I assume when you hit save the engine iterates through all entities and you can see in the game code each entity has some configuration data that returns details about the state of each entity. When you reload a game the each entity is recreated and its internal state is set to what was saved from the game code. That way each entity ends up in the same spot, with the same health, at the same point in the same animation etc.
[url]https://swagger.io/[/url] for documenting APIs. You may want to use a library to generate it though.
What do the Apache error logs say?[/QUOTE]
Nothing actually. Just a warning about using Python 2.7.12 instead of 2.7.11.
So I finished setting up the domain, and now I'm just getting the Apache test page when I go to the [URL="glencoverx.com"]domain.[/URL]
[QUOTE=war_man333;52564362]Open-Source/github question.
What would be a way of having assets I paid for but still having an open source repository?
Maybe open source the code but not the whole repo?[/QUOTE]
Does Github let you have a private sub-repo in a public repo? That might be the easiest thing to do.
Otherwise I think some some version control systems (like Perforce?) let you export sub-directories as a Git repo.
[QUOTE=Adelle Zhu;52565225]Nothing actually. Just a warning about using Python 2.7.12 instead of 2.7.11.[/QUOTE]
Hm, that doesn't sound right - maybe turn up the logging settings so everything gets logged. Is there anything at all in error.log?
Also, if you're getting the Apache test page is your config file in the sites-enabled directory or whatever?
[QUOTE=tschumann;52566841]Does Github let you have a private sub-repo in a public repo? That might be the easiest thing to do.
Otherwise I think some some version control systems (like Perforce?) let you export sub-directories as a Git repo.
Hm, that doesn't sound right - maybe turn up the logging settings so everything gets logged. Is there anything at all in error.log?
Also, if you're getting the Apache test page is your config file in the sites-enabled directory or whatever?[/QUOTE]
False alarm on the test page. I entered one digit of the IP wrong when I changed the A record of my domain and it ended up pointing to the Apache test page of a porn site.
[editline]12th August 2017[/editline]
We're back to the 500 error though. Even setting the Flask instance to debug doesn't bring up the debug page. I have no idea how to tell if it's running the WSGI and starting the virtual env.
[editline]12th August 2017[/editline]
Here's the Apache error.log with logging set to info.
[code]
[Sat Aug 12 22:31:15.250908 2017] [wsgi:warn] [pid 2430:tid 140371370882944] mod_wsgi: Compiled for Python/2.7.11.
[Sat Aug 12 22:31:15.250965 2017] [wsgi:warn] [pid 2430:tid 140371370882944] mod_wsgi: Runtime using Python/2.7.12.
[Sat Aug 12 22:31:15.251487 2017] [mpm_event:notice] [pid 2430:tid 140371370882944] AH00489: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g mod_wsgi$
[Sat Aug 12 22:31:15.251505 2017] [core:notice] [pid 2430:tid 140371370882944] AH00094: Command line: '/usr/sbin/apache2'
[/code]
What tutorial are you following?
It may be worth getting the right version of Python/mod_wsgi anyway - it's only a minor version change but something important may well have changed.
What is the opinion about being older as a programmer in industry? Recently I've considered becoming a CS, but my parents are very against it. They claim that as a CS, while you're 20-30 you can happily work long hours for good pay, but as you age and have other life priorities like family you'll want to settle down, and that as you get older you'll have a much more difficult time keeping up with new technologies when compared to fresh college graduates.
They claim that if I continue to do engineering (electrical) that I'll have better job security and that my age/experience will actually help me when compared to computer science.
I don't know, I've read articles about age discrimination and stuff, and how often times older applicants will want to hide the years as not to reveal their age. At the same time, people claim that the median age of companies like Google being relatively young (only 29 when compared to the average of 42 across all industries/professions) is just because CS has been growing recently, and eventually this number will rise as the workforce grows older.
I'm not looking to argue with anyone, or prove anyone wrong. I just want people's opinions on this matter.
I tried using clang (on Windows with VS2015 as part of the LLVM-vs2014 platform toolset) to compile my C++ program which uses some boost header-only features (property tree), but it seems to be spewing out a shitload of errors about boost, hundreds of them. This is weird because the default VS2015 compiler had no problems compiling at all. Did I do something wrong? Nothing urgent since I can still use the default VS2015 compiler, but I would really rather use clang.
[QUOTE=thefreemann;52574432]What is the opinion about being older as a programmer in industry? Recently I've considered becoming a CS, [b]but my parents are very against it.[/b][/QUOTE]
I'd say go for whatever you think is best, and not let anyone else tell you what's good or bad. The worst thing you can do is give in to peer pressure (friends, family, etc) because it's not what [i]you[/i] wanted to do, but rather what other people told you to do.
Just go with your gut instinct, that's all I can say.
[QUOTE=thefreemann;52574432]What is the opinion about being older as a programmer in industry? Recently I've considered becoming a CS, but my parents are very against it. They claim that as a CS, while you're 20-30 you can happily work long hours for good pay, but as you age and have other life priorities like family you'll want to settle down, and that as you get older you'll have a much more difficult time keeping up with new technologies when compared to fresh college graduates.
They claim that if I continue to do engineering (electrical) that I'll have better job security and that my age/experience will actually help me when compared to computer science.
I don't know, I've read articles about age discrimination and stuff, and how often times older applicants will want to hide the years as not to reveal their age. At the same time, people claim that the median age of companies like Google being relatively young (only 29 when compared to the average of 42 across all industries/professions) is just because CS has been growing recently, and eventually this number will rise as the workforce grows older.
I'm not looking to argue with anyone, or prove anyone wrong. I just want people's opinions on this matter.[/QUOTE]
I work with/have worked with programmers in their 40s and 50s and they have no issues as far as I can see. They bring a lot experience to the table; I've got no issue working with them and they're probably on better money because of their experience.
I would absolutely agree that the median age thing is just because the industry is really growing right now too.
[QUOTE=thefreemann;52574432]What is the opinion about being older as a programmer in industry? Recently I've considered becoming a CS, but my parents are very against it. They claim that as a CS, while you're 20-30 you can happily work long hours for good pay, but as you age and have other life priorities like family you'll want to settle down, and that as you get older you'll have a much more difficult time keeping up with new technologies when compared to fresh college graduates.
They claim that if I continue to do engineering (electrical) that I'll have better job security and that my age/experience will actually help me when compared to computer science.
I don't know, I've read articles about age discrimination and stuff, and how often times older applicants will want to hide the years as not to reveal their age. At the same time, people claim that the median age of companies like Google being relatively young (only 29 when compared to the average of 42 across all industries/professions) is just because CS has been growing recently, and eventually this number will rise as the workforce grows older.
I'm not looking to argue with anyone, or prove anyone wrong. I just want people's opinions on this matter.[/QUOTE]
It really depends. I would say some CS people have a hard time following new trends, but I think it's a person thing, not an age thing. In my company and similar companies, the older you are, the higher your abstraction level. So you're managing in some way. Architecture, team, accounts.
[QUOTE=thefreemann;52574432]What is the opinion about being older as a programmer in industry? Recently I've considered becoming a CS, but my parents are very against it. They claim that as a CS, while you're 20-30 you can happily work long hours for good pay, but as you age and have other life priorities like family you'll want to settle down, and that as you get older you'll have a much more difficult time keeping up with new technologies when compared to fresh college graduates.
They claim that if I continue to do engineering (electrical) that I'll have better job security and that my age/experience will actually help me when compared to computer science.
I don't know, I've read articles about age discrimination and stuff, and how often times older applicants will want to hide the years as not to reveal their age. At the same time, people claim that the median age of companies like Google being relatively young (only 29 when compared to the average of 42 across all industries/professions) is just because CS has been growing recently, and eventually this number will rise as the workforce grows older.
I'm not looking to argue with anyone, or prove anyone wrong. I just want people's opinions on this matter.[/QUOTE]
I don't know if this really helps, but try to make the most informed decision possible that you can [B]live with[/B].
I had to grind my way through my first degree because I kinda lied to myself into wanting to do it. It was a grind because as time went on I liked it less and less. Now 6 years after starting, I'm starting over in Applied Computer Science.
[QUOTE=thefreemann;52574432]They claim that if I continue to do engineering (electrical) that I'll have better job security and that my age/experience will actually help me when compared to computer science.[/QUOTE]
I believe this is actually still true at the moment but it's a minor issue overall and from what I know the demand for people in the field of computer science is growing at a very quick pace. Demand for electrical engineers is growing too but it's at a slower pace. So I'd personally just go for the one you enjoy more.
So I've narrowed the error a little. It's resulting from the WSGI script. I've followed a whole bunch of tutorials all resulting in a similar looking script.
Here's the current state of /var/log/apache2/error.log
[code]
[Tue Aug 15 18:29:51.988712 2017] [wsgi:warn] [pid 4407:tid 139794006046592] mod_wsgi: Compiled for Python/2.7.11.
[Tue Aug 15 18:29:51.988719 2017] [wsgi:warn] [pid 4407:tid 139794006046592] mod_wsgi: Runtime using Python/2.7.12.
[Tue Aug 15 18:29:51.989018 2017] [mpm_event:notice] [pid 4407:tid 139794006046592] AH00489: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g mod_wsgi/4.3.0 Python/2.7.12 configured -- resuming normal operations
[Tue Aug 15 18:29:51.989033 2017] [core:notice] [pid 4407:tid 139794006046592] AH00094: Command line: '/usr/sbin/apache2'
[Tue Aug 15 18:29:51.998541 2017] [wsgi:info] [pid 31452:tid 139794006046592] mod_wsgi (pid=31452): Attach interpreter ''.
[Tue Aug 15 18:29:55.392230 2017] [ssl:info] [pid 31454:tid 139793895741184] AH01964: Connection to child 64 established (server xxxx.com:443)
[Tue Aug 15 18:29:55.393068 2017] [ssl:info] [pid 31453:tid 139793769936640] AH01964: Connection to child 198 established (server xxxx.com:443)
[Tue Aug 15 18:29:55.394889 2017] [ssl:info] [pid 31454:tid 139793887348480] AH01964: Connection to child 65 established (server xxxxx.com:443)
[Tue Aug 15 18:29:55.470346 2017] [wsgi:info] [pid 31452:tid 139793853777664] mod_wsgi (pid=31452): Create interpreter 'xxxx.com|'.
[Tue Aug 15 18:29:55.471281 2017] [wsgi:info] [pid 31452:tid 139793853777664] mod_wsgi (pid=31452, process='Simon', application='xxxxx.com|'): Loading WSGI script '/var/www/Simon/Simon.wsgi'.
[Tue Aug 15 18:29:55.474876 2017] [wsgi:error] [pid 31452:tid 139793853777664] mod_wsgi (pid=31452): Target WSGI script '/var/www/Simon/Simon.wsgi' cannot be loaded as Python module.
[Tue Aug 15 18:29:55.474889 2017] [wsgi:error] [pid 31452:tid 139793853777664] mod_wsgi (pid=31452): Exception occurred processing WSGI script '/var/www/Simon/Simon.wsgi'.
[Tue Aug 15 18:29:55.474904 2017] [wsgi:error] [pid 31452:tid 139793853777664] Traceback (most recent call last):
[Tue Aug 15 18:29:55.474925 2017] [wsgi:error] [pid 31452:tid 139793853777664] File "/var/www/Simon/Simon.wsgi", line 10, in <module>
[Tue Aug 15 18:29:55.474968 2017] [wsgi:error] [pid 31452:tid 139793853777664] from Simon import simon as application
[Tue Aug 15 18:29:55.474984 2017] [wsgi:error] [pid 31452:tid 139793853777664] ImportError: No module named Simon
[Tue Aug 15 18:29:55.863019 2017] [wsgi:info] [pid 31452:tid 139793887348480] mod_wsgi (pid=31452, process='Simon', application='xxxxx.com|'): Loading WSGI script '/var/www/Simon/Simon.wsgi'.
[Tue Aug 15 18:29:55.863855 2017] [wsgi:error] [pid 31452:tid 139793887348480] mod_wsgi (pid=31452): Target WSGI script '/var/www/Simon/Simon.wsgi' cannot be loaded as Python module.
[Tue Aug 15 18:29:55.863870 2017] [wsgi:error] [pid 31452:tid 139793887348480] mod_wsgi (pid=31452): Exception occurred processing WSGI script '/var/www/Simon/Simon.wsgi'.
[Tue Aug 15 18:29:55.863894 2017] [wsgi:error] [pid 31452:tid 139793887348480] Traceback (most recent call last):
[Tue Aug 15 18:29:55.863917 2017] [wsgi:error] [pid 31452:tid 139793887348480] File "/var/www/Simon/Simon.wsgi", line 10, in <module>
[Tue Aug 15 18:29:55.863940 2017] [wsgi:error] [pid 31452:tid 139793887348480] from Simon import simon as application
[Tue Aug 15 18:29:55.863957 2017] [wsgi:error] [pid 31452:tid 139793887348480] ImportError: No module named Simon
[Tue Aug 15 18:34:55.529604 2017] [ssl:info] [pid 31454:tid 139793895741184] (70007)The timeout specified has expired: [client 100.2.224.37:62891] AH01991: SSL input filter read failed.
[/code]
The apps codename is Simon obviously. It's supposed to be calling the instance of simon = Flask(__name__) from Simon.py, the main app script.
[editline]15th August 2017[/editline]
This runs perfectly in PyCharm, no import error so I don't really know what to try next.
I'm not sure how Python's package resolution all works but maybe it's runnig the .wsgi file from a directory that doesn't contain your package.
Now is suddenly not ruining the script at all. I'm considering dumping Apache.
I've never used Apache for personal projects but I get the impression it requires a bit of tuning if you're not doing something simple.
I have used nginx and uWSGI before though and the only way I got it working was with a tutorial.
So If I were to make a simple Windows application which I would use for creating .md files for my blog with some extra meta data and likely. Which library or framework would you guys recommend for C#?
When I compile a C++ project with Visual Studio I end up with a projectname.pdb and a vc141.pdb - I understand I should hang on to the .pdb file for a tagged release so that I can debug crashes regardless of code or compiler changes but I haven't been able to find the use of or reason for the existence of vc141.pdb - I assume that projectname.pdb is the bulk of the information as it is bigger but vc141.pdb seems like it could contain toolset-specific stuff (I think I'm using toolset v141) but I'm not sure - anyone know for sure?
So I ditched Apache altogether and went with Nginx and Gunicorn. This is the closest I've gotten to getting this shit to work.
As of right now, the app launches properly in the background using Supervisor. My current issue is Nginx not passing any connections (http or https; I have SSL.) to Gunicorn. I'm simply stuck with the "Welcome to Nginx" page even though I've deleted the default conf from /etc/nginx/sites-available and sites-enabled.
This is what my app's conf looks like:
[code]
upstream simon_server {
server unix:/var/www/Simon/simon.sock fail_timeout=0;
}
server {
listen 443 ssl;
server_name glencoverx.com;
client_max_body_size 4G;
access_log /var/www/Simon/logs/nginx-access.log;
error_log /var/www/Simon/logs/nginx-error.log;
location /static/ {
alias /var/www/Simon/static/;
}
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Host $http_host;
proxy_redirect off;
}
ssl_certificate /etc/letsencrypt/live/glencoverx.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/glencoverx.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
if ($scheme != "https") {
return 301 https://$host$request_uri;
}
}
[/code]
The sock is present in that directory and is created by Gunicorn upon start. It's just that Nginx won't touch it.
Does the nginx process have the right permissions to use the .sock file?
Not sure why you'd be seeing the Welcome to nginx page (I assume you've started nginx) - I think nginx has its own log files separate to what you configure - possibly there's something in those that will help?
edit: also, that 301 may never occur - it would need to be in a separate server block listening on port 80 I think?
[QUOTE=tschumann;52589105]Does the nginx process have the right permissions to use the .sock file?
Not sure why you'd be seeing the Welcome to nginx page (I assume you've started nginx) - I think nginx has its own log files separate to what you configure - possibly there's something in those that will help?
edit: also, that 301 may never occur - it would need to be in a separate server block listening on port 80 I think?[/QUOTE]
There's nothing in the nginx logs saying that it can't access the sock. What's weird is that I've deleted the conf that usually shows the welcome page. I have no idea where it's going to even get the html for the page. HTTPS is working fine as far as I can tell. Even if I was accessing as http, it's redirecting to https anyway.
Am trying to work with MIDI files in C# to literally output the notes that it finds in the correct sequence ( and then create a latex document with all of that information in it - but that's later)
The problem I find is that reading the file in with File.ReadAllBytes and converting it into an array of bytes (string) and then attempting to iterate over it all is somehow missing out notes. Is there any alternative method for processing the file?
Also for the actual sequencing bit, I'd quite like to identify chords and a basstrack. Is the best way to do that human input? Or is there a better methodology?
[QUOTE=Karmah;52555262]Say I have a triangle that is randomly oriented in 3D space in any particular direction
How can I compute a rotation matrix from it, such that I can use it to transform its own points into "triangle space"?
Since all 3 points of a triangle define a plane, then their coordinates relative to the plane only change on 2 axes. In a nutshell I want to get the local coordinates of points on a triangle relative to its plane.
I'm sure there is a way, but there are also infinite ways that the space could be rotated on the 3rd axis. I'm not sure how I would define which way is up relative to the plane.[/QUOTE]
In case you're still looking for this, I believe what you're looking for is barycentric coordinates, you'll get triangle coordinate, although tbh the question is very slightly unclear. You can then use the barycentric coordinates to interpolate pretend triangle uvs across the face of the triangle to get 2d coordinates
Here's an example [url]https://github.com/20k/OpenCLRenderer/blob/master/cl2.cl#L5372[/url] and here's usage [url]https://github.com/20k/OpenCLRenderer/blob/master/cl2.cl#L5729[/url]
This was for my opencl monstrosity renderer. If you want screenspace coordinates instead (ie you interpolate in 2d with z as depth, not with a 3d global point), look at interpolate_get_const. I got better at naming functions eventually
[editline]20th August 2017[/editline]
[QUOTE=CarLuver69;52552610]-alignment stuff-[/QUOTE]
Personally I've always used some variant of this
[cpp]int rem = val % align;
if(rem != 0)
{
val -= rem;
val += align
}[/cpp]
That is extremely easy to get my head around for me! (This aligns upwards, its for opencl)
So I am doing this program in Visual Studio and currently I am copy and pasting the folder with the project in it then changing the file name.
[img]http://i.imgur.com/L2Am9Lj.jpg[/img]
So if I screw something up I can just go back to the previous folder and start over. Then I have the last 3 most recent folders on Dropbox so I have access to them on multiple computers. I am just curious, what is the not stupid way to do this? I am sure there is a better way I just do not know what that is.
Also second question, does anyone know a good little 2d sprite type engine I could screw around on. I am using c#.
[QUOTE=Jitterz;52593405]So I am doing this program in Visual Studio and currently I am copy and pasting the folder with the project in it then changing the file name.
[img]http://i.imgur.com/L2Am9Lj.jpg[/img]
So if I screw something up I can just go back to the previous folder and start over. Then I have the last 3 most recent folders on Dropbox so I have access to them on multiple computers. I am just curious, what is the not stupid way to do this? I am sure there is a better way I just do not know what that is.[/QUOTE]
[URL="https://www.visualstudio.com/en-us/docs/git/gitquickstart"]Git for heavens sake, git[/URL]
[QUOTE=gokiyono;52593412][URL="https://www.visualstudio.com/en-us/docs/git/gitquickstart"]Git for heavens sake, git[/URL][/QUOTE]
Alternatively [URL="https://tortoisehg.bitbucket.io/"]Hg[/URL].
vs. Git:
pros:
- easier to use
- harder to break
cons:
- unsupported on GitHub (which is pretty major)
[QUOTE=gokiyono;52593412][URL="https://www.visualstudio.com/en-us/docs/git/gitquickstart"]Git for heavens sake, git[/URL][/QUOTE]
Thanks it is literally built into Visual Studio. I accidentally clicked on it once and panicked and reverted back.
Watched a couple of videos and am all set up will see how it goes.
Thanks again!
Mercurial with Bitbucket is lovely.
[QUOTE=Adelle Zhu;52593909]Mercurial with Bitbucket is lovely.[/QUOTE]
Right, but the community really isn't there.
Saying GitHub is like Facebook for programmers is unfortunately not an understatement.
Sorry, you need to Log In to post a reply to this thread.