You should definitely have a separate testing environment from production if for no other reason than to prevent fat-fingering things. In GCP, that's probably a separate project since projects are basically the unit of isolation over there.
As for being able to run your own instance of things in isolation, that really depends on the fidelity you want. Firebase has an emulator you could use, and Cloud Functions/AppEngine can be built into docker images locally using the public buildpacks (but won't have the full suite of attached services), but I'd probably recommend good service mocks/stubs/fakes your services plus a pipeline that spins up a full project with Terraform, runs integration tests, then tears it down for e2e testing.
> Maybe your OS allows the malloc call, hoping that you won't actually use it all
That's exactly what most systems do, at least by default - they overcommit memory, with the assumption that not every page of memory allocated will actually be used.
When malloc requests memory from the kernel, it doesn't actually get a physical allocation back - it effectively just gets an IOU for a range of pages. The address range is marked as allocated, but left unbacked by physical pages - instead they're left as unreadable and unwritable.
When the application tries to use the memory, the MMU triggers a page fault, and the fault handler then sees the page is marked as allocated and updates the mapping to point to a free page of memory. Overcommit emerges naturally from this - you don't actually need to have memory handy in order for applications to allocate it.
It's a bit like fractional reserve banking - not every requested page will actually get used, and not every used page actually needs to be backed by a unique physical page. If you fork(), all your writeable mappings can still point to the parent process's pages and just be marked Copy-on-Write — most probably won't be made dirty, so will stay that way for the lifetime of the program.
Without overcommit, the system can't make this assumption - it needs to be able to guarantee every page can actually be backed by memory or swap even if it's not actually used. This can be good for reliability in the sense that malloc will outright fail instead of returning memory that will kill something if it's used, but it can be bad for efficient resource use.
Check out Godot's page on their license. Fortunately for you Godot uses the MIT license which lets you do basically anything you want so long as you include their copyright notice somewhere in your project.
Other open source licenses aren't so lenient. If you really intend to sell software you must understand the licenses of the parts you use, in particular licenses like GPL obligate you to produce source upon request and other restrictions.
I'm sorry to hear about your friend.
I'm not an expert on AWS because 99% of my experience is in Azure, but I htink your friend had an AWS EC2 instance (https://aws.amazon.com/ec2/instance-types/). This is a virtual server running on AWS. He specified the id for that instance in a configuration. This script then connects to that instance, using his credentials, and runs minecraft on it. That is why the IP changes - the instance id remains the same, but every time you ask AWS to give you a server for that instance, it spins up a new one and gives it to you. Beyond that, no real clue - it's open source; maybe post an issue on the repository explaining the situation and one of the people who has contributed to it will take it over?
What you would need to do to take it over is create your own AWS account, your own EC2 instance, and get the id / credentials for it and set this script up to run with those.
You can try Processing which is a Java-based environment made for learning to code within the context of visual arts. You can read about it here: https://processing.org/ Additionally, there are libraries for Javascript (p5.js) and Python (p5py).
Uncle Bob's Clean Coders video series is almost exactly what it sounds like you are looking for (I believe this is a paid video series, though). He goes over writing clean code, and then how to write unit tests to support this clean code. His big emphasis in the series is TDD and writing good unit tests.
It also sounds like you are jumping the gun a little bit and thinking about the end result. The number one recommendation I can give you is just start doing it. Go write a unit test, create the class to support it. Go write another unit test to complete your first business logic, complete that test, then continue this until you have a fully functional class. I didn't grasp a lot of the concepts until I started just doing it.
The number one thing Uncle Bob touches on is "Red, Green, Refactor", which is write a failing unit test, make it pass, then refactor it. Repeat this process until you are done, and refactor til' you drop.
You may not understand what you're reading online, but exposing yourself to it is huge, and if you continue to practice and read, you will eventually understand it all. If something doesn't make sense, google it and find a good article that breaks the topic down. That's probably the biggest hurdle when trying to become a better programmer: a lot of blogs use acronyms and highly technical jargon that can make reading a momentous task at times.
https://codeclimate.com/quality/ is what first comes to mind. They grade code based on maintainability and churn.
There's also plenty of language-specific open source tools, reek is a decent one for Ruby.
> when I switch to other apps like slack
Slack does have keyboard shortcuts.
https://slack.com/help/articles/201374536-Slack-keyboard-shortcuts
> Also, will tiling managers be a good choice?
I think so, but I don't use them.
Came here to say this. There is an alternative though, and I run both on my computer at home. I limit them both to 40% of the CPU. Otherwise they work it so hard it can't come out of the screensaver.
The other is BOINC. I get work packages from World Community Grid which is run by IBM.
I think your point of view comes from that fact that you're thinking on SQL. You're assuming that ACID transactions are a must, but the truth is that it not (always) necessary.
I'll recommend this book to see things from a different perspective.
Here's one on Amazon:
https://smile.amazon.com/Dell-Inspiron-i7-7700HQ-Quad-Core-Keyboard/dp/B075697SK2
$942.90
Is that Dell a good laptop? No idea. Is the bump in specs, and getting something brand new, worth the extra $160? That's up to you.
In general, for programming, I'd opt for a higher-resolution screen. 1366x768 is going to be frustratingly constraining.
16GB of RAM is nice. The i7 is probably overkill.
Yes, that's a poor comment.
You should be stating what a function does on a high level. For example, let's look at this function:
/** * A sanity check to ensure all users are valid. * * @return true if all users are found valid, false otherwise */ function validateUsers() -> boolean { for(int i=0; i<users.size(); i++) { if(! isValid(users[i])) { return false; } }
return true; }
The variable and function names are clear, and we give a high-level comment about what it does, what it returns and when to use it.
Edit: If you want to improve on code construction, documentation and understandability I highly recommend reading Microsoft's "Code Complete".
not sure if trolling ...
Line 1-3 defines the struct and creates one instance (WatTheHell).
Line 6 and 7 create two pointers that you both fill with a reference to that one instance.
What you want is ...
struct Wat { uint16_t A; };
int main(int argc, const char * argv[]) { struct Wat B; struct Wat C; [...]
Basically see http://www.tutorialspoint.com/cprogramming/c_structures.htm section "Accessing Structure Members"
Regarding typedef ...
struct Wat { // this defines a struct with one instance WatTheHell uint16_t A; } WatTheHell;
typedef struct Wat { // this defines WatTheHell as a shorthand for "struct Wat" uint16_t A; } WatTheHell;
I think you should know how to think logically and do basic algebra before learning programming. For example, you should be able to think through a program and write down on paper how it's going to work through text or a flowchart.
We as programmers have done a pretty bad job of the whole "setting up environments" part. If you want to get started programming you should only have to download and install one thing. Python is the only environment that seems to be able to do this because it includes its own IDE and documentation built in.
I found that it took me about two years to be comfortable on the command line and one or two more until I preferred doing things on it; you just have to force yourself to use it until it feels right.
In a deeper comment you say that you'd like to know a little more about operating systems. If you feel up to it Linux from scratch gives you complete instructions to build your own Linux OS from source code. You don't have to learn any of the academic OS stuff but it'll take you through compiling a kernel, the filesystem structure, the bootloader, how the system gets going after it gets powered up, how the shell works with PATHs, and how Linux/Unix/BSD systems are structured (and by proxy OSX). Even better, it's mostly done on the command line, so you'll get step by step experience with that; I did it about five years ago and learned a lot.
are you getting in over your head? probably.
is there any reason it might be actually impossible? probably not.
your best bet would be to get in contact with these folks: http://www.alsa-project.org/
[The History of VPN creation | Purpose of VPN | Le VPN (le-vpn.com)](https://www.le-vpn.com/history-of-vpn/#:~:text=The%20history%20of%20VPN%20(virtual,a%20computer%20and%20the%20internet.&text=That%27s%20where%20VPNs%20came%20in.)
Here is an overview of what WSGI is.
And here are some instructions for a simple "Hello" WSGI App that (optionally) uses Nginx as a proxy.
Nothing comes easy. If your goal is to get a new job then you need to fight for it. You need to become a professional job seeker. Your resume needs to really sell your value, no mistakes or awkward language. Practice coding challenges, I like these, https://www.freecodecamp.org/learn/ but don't waste all your time on them.
Prepare for interviews, know what you are going to say to the common questions.
Put out a lot of resumes. Eventually you will get interviews and you will learn from them. You will also learn from the challenges they give you. Its worth it because it makes you a better developer. You learn a lot from it.
You could also put together a demo site to showcase your skills.
Basically, put together a road map. List the things you want to work on and remember that the end goal could change your life. Aim high.
My problem was that I waited too long to start applying, I thought I always needed to be better before I could start applying, so have balance.
Practice, build and apply.
When I was with a shared hosting provider I used https://www.nearlyfreespeech.net/, they're incredibly cheap if you just need a standard wordpress install and don't get a lot of traffic. I currently am with https://www.digitalocean.com/
If you are looking at creating a static site GitHub offers free hosting, although it's a bit more difficult to set up.
Basically just create a file called .gitignore
in the root of your project and put .env
into it and youre good.
You can, but you're gonna have to work your ass off.
Take this guy for example. 3 months of applications, nearly 300 positons, contacting higher ups personally, spent weeks - if not months - of extra time studying independently.
TL;DR: if you're willing to play the job search game on hard mode, it's doable.
Another tool a lot of people use for this is Anki; it's free (and open-source!), very powerful, there's phone versions so you can review on the go, yadda yadda.
The concept in general, if you want to google, is called ‘SRS’ — a Spaced Repetition System for memory.
The final question is basically how to get the data out of your school's proprietary system — you might want to look around and see if ‘Phoenix Synergy SIS’ has an API, or data-export system?
Good luck!
The seven lines of code are the lines used by merchants to interface with Stripe. See https://stripe.com/docs. The backend of Stripe is much more than seven lines of code. The code interfacing with a bank depends on what technology the bank is using. Not all banks have a pretty RESTful API.
Are you sure the compile worked properly after you switched back to master?
Though, maybe the compiler is being "smart" and compares timestamps and thigns "oh, that binary is newer than the code so no need to recompile" -> run git clean as a precaution.
Floating points are a great way to screw things up. In short there are a lot of ways to handle floating point numbers and it's easy for a number to get changed a little each time it's worked with, this little change can add up. For example. The Patriot missle system software didn't properly account for how the hardware managed floating point numbers and the problem endup up causing a missle interceptor not to fire on a Target and 28 airmen died. To get a leg up on how to work with floating point numbers look at IEEE 754.
Here's a good entry point at wiki for floating point errors and mitigation.
And here's a very good write up of the Patriot missle system error that specifically talks about why you can't store one tenth.
There are few things you gotta think before you go into it. Tbh I have been there; I had a Desktop which was horribly slow and here I was trying to compile C/C++ code in it. The build was so damn slow that just to build Clang LLVM took around, forget around entire day!
So starting from yours first I believe you live in India (I am from India as well) so as PabloDons mentioned, and sorry I don't think you'll be able to use shadow.tech as they don't have any servers in or near India, therefore you will be forced to Europe or Americas (and the ping will ruin your day) and second that they probably will cost you quite much as the payment itself will be according to the country that you'll select.
And now coming to EC2, AWS EC2 free tier offers a shitty machine so you'll probably want to rev up a bit to get a better one, but again you will have to look for it since EC2 is majorly for server hosting and built that way.
Finally since you're gonna be using Photoshop and JAVA I would suggest to make sure to have a good look around GPU and RAM that you're going for.
This is just consideration, I bought a new laptop for myself since compiling Cpp code in cloud was worst experience in my opinion, however if you're able to afford more CPUs that might be a better bet.
It is Microsoft's minimal Visual Studio IDE that they have made available for nixian (Mac included) systems. It has a ton of really cool plug-ins and features for just about any language.
Any CMS with versioned content would work.
I'm using DokuWiki at work but it's more aimed at people who aren't afraid of monospace editing boxes. You'll probably want to look out for something that brings a WYSIWYG editor.
A segmentation fault means there was an invalid memory access - an out-of-bounds array index, NULL pointer dereference, use-after-free, etc.
Valgrind is a useful tool for debugging memory issues.
First, here's some other programming practice sort of places that aren't math related necessarily. Maybe you already know about them, but they're worth mentioning.
I'm sure there are more, but those are ones I'm familiar with. Those are all sorta small things like Project Euler, just not math specific.
You can browse /r/coolgithubprojects for links to cool GitHub repos, sometimes they are looking for contributors but if not it's a great place to get ideas and inspiration.
I think highschool IT class basics. So hopefully they already know some coming out of secondary school. Things like:
These type of activities help show people that you give computer instructions to do things and it isn't all magic.
If you are looking to give people that have zero knowledge about how computers work and programming some learning resources my three things are:
For more advanced topics of any kind my recommendation is almost already reading. So much knowledge out there in books, official documentation, web blogs, free tutorials, etc.
Web development and data science are both two giant buzz words.
Learn basic scripting, get a book on python. john zelle has some great ones start with his.
Learn print statements, string manipulation, conditionals, loops.
then learn about object oriented programming
classes, objects, methods. encapsulation, inheritance, polymorphism, and abstraction.
Then learn data structures,
lists, arrays, structs (C), linked lists, trees.
Then you’ll wanna learn about algorithms, and Big O.
Now time to get into web dev
Next I would start learning about unix system administration. Learn how to host web servers on linux using apache. Learn about networking, IPs, ports, signed certs. Learn about mySql databases, postgresql, or mariaDB. Learn some html, PHP, javascript, css. Learn about technologies such as Docker. Learn how to host things on AWS EC2
Next I would look into learning a language like R, and further your python knowledge for your data science.
With python and R i think you should be able to do some basic machine learning, you’ll be able to do some decent data visualization. I don’t know too much about data science, but you’ll want to study the math behind it.
Start with this book, follow this checklist. itll take you about a year and a half tops. If you’re not in college, I would really recommend find a community college and doing an associates program in computer science.
Python Programming: An Introduction to Computer Science, 3rd Ed. https://www.amazon.com/dp/1590282752/ref=cm_sw_r_cp_api_glt_fabc_M36WM7M8TYPR6EY4VAJZ
I've got Code Complete 2nd Ed. It covers not just writing good code, but planning, designing, and running an effective software project. Consequently, it's very long but it's broken into chapters you can jump to. I definitely recommend it. One complaint I have though is that some of it is out of date. You definitely won't find anything about C++11 in here. And he's definitely dismissive of exceptions which have become more widely accepted in recent years as we've come to grips as an industry with how to write good, exception-safe code.
I think if it's getting to the point where you're spending a long time on stuff that doesn't matter too much (minor changes in legibility) and pissing off your coworkers it's gone too far.
This article is a pretty good summary
The biggest problem I see here is that you want to make code perfect. The thing is - perfect for you is not perfect for others. There is no standard way of specifying everything in any language. Your coworkers will never write code exactly the same way as you, as they have different brains.
Take Clean Code. There are a lot of good rules in that book. There are also a lot of the author's personal conventions masquerading as rules. They may be good conventions, but others can be equally good or even better.
In short, I think you should be forgiving when it comes to code. When you think about it, what percentage of code have most of us here written that is still around 10 years later? To spend time increasing readability by 2% is a waste of our very short lives.
It depends on what you want to do.
Web? There's php, javascript, ruby, or python.
Mobile? Java or swift.
Hardware? C, C++.
Pretty much all those languages other than swift have been around for decades and probably aren't going to be disappearing anytime soon.
If you want versatility, java is a pretty safe bet.
But don't get stuck concentrating too much on one language, learning about multiple languages can broaden the way you think about programming in general. The Pragmatic Programmers advises learning one language every year. Maybe spend some time with an imperative language like java, then look into a functional language like scheme.
I'm getting off topic here, but there are so many languages out there it's best not to get stuck with just one in your toolbox.
well, first, you should get out of the habit of calling it JAVA, it's just Java; it's not an acronym.
as for your question, i found this: https://play.google.com/store/apps/details?id=com.spartacusrex.spartacuside&hl=en
there really aren't any good solutions yet and i don't think there ever will be until mobile os's are just the same as desktop os's and you can use the same software everywhere. i've already seen this happen where i work. we used to buy ipads for producers and such and now we've switched them all over to surface pros; it just makes more sense.
as for developing on mobile in the current environment, you probably should be looking at cloud services that you could use for development through a web browser like https://c9.io/ or some type of vpn/remote desktop client for your phone.
Might be like drinking from a firehose, but amazon offers a whole year on their free tier.
If you're an active student, then there's also AWS education accounts, but can't speak to it as I've never used it (looks like there's an application process).
Really though, as /u/sathyabhat has said, a $5 Virtual Private Server (VPS) is pretty darn cheap these days.
/u/visvis is right that the proper way to do this is with your operating-system's code-signing features, assuming your OS has them. The thing is, if your executable has been tampered with, then there's no way to know if the tampering-check itself has been compromised. You could use this method to rule out accidental file corruption, but if the executable file has been intentionally changed, then the attacker could just bypass the MD5 check, or replace the MD5 sum with one that matches their changes.
That said, if you can calculate the MD5-sum of any file, then you can just do that to your own executable. argv[0]
contains the file name of the command, but that doesn't give you the full path - how you get that depends on your platform - see this Stack Overflow question. On Linux, /proc/self/exe
is a symlink to the currently running executable, on Windows you can call <code>GetModuleFileName</code> with a NULL
first argument to get the path.
Godot is a nice game engine that uses gdscript as its default programming language. gdscript is like a simplified version of python, so you'll be able to pick that up quickly.
they're binaries, executables, programs, applications, whatever you want to call them. scripts are generally the source code in a file that gets interpreted when you run them.
if all you want to do is some basic windows automation stuff in response to key presses, probably just use something like this https://autohotkey.com/.
If you're allowed to use C99 in your course, just use the C99 <code>round()</code> family of functions.
Prior to C99, ANSI C doesn't include arithmetic rounding: it has floor()
and ceil()
to round down and up, respectively. So you'll need to test the number you want to round to see if it's >= floor(x)+0.5
(and the opposite for rounding negative numbers). You'll also need to check first if the appropriate <type>_MAX - 0.5 > x
(again, reverse the logic for <type>_MIN
below zero). This may be something you'll wrap up in a utility function if you use it often.
I recommend not using <code>int</code> tricks, since they don't overflow correctly.
POSIX requires that a read
that is called after a write
has returned must return (part of) the new data, but not all filesystems conform to POSIX. You can at best be sure that all the data has been copied into the buffer before write
returned. (And all file descriptions to the same file share one common buffer.) FAT, NTFS, ext, etc are compliant, IIRC.
>In fact, on some buggy implementations, it [write()
] does not even guarantee that space has successfully been reserved for the data. The only way to be sure is to call fsync(2) after you are done writing all your data.
I reread my explanation and I'm not surprised it didn't make sense, what I'm saying is the \
is to escape the /
in the string, when you use the JSONobject's put
method, it's going to escape characters from the string, it doesn't know that you've you already escaped what you wanted to escape.... so you're receiving an escaped string \/Date(1539147600000)\/
and instead of parsing the JSON string you're receiving, so you get /Date(1539147600000)/
you're trying to escape the escape character and just going deeper and deeper. Your way overthinking the problem and brute forcing a solution due to not understanding strings vs json strings.
I have an example that accomplishes what you want however.
> C++ and eloquent don't pair up
Eh, I sort of agree and sort of disagree. C++ gives you the tools to write an elegant solution, even if it doesn't do it for you:
#include <iostream> #include "xrange.hpp" #include "xrange-2d.hpp"
int main() { for (int x : xrange(1, 4)) for (int y : xrange(1, 5)) std::cout << x << ", " << y << "\n"; std::cout << "or...\n"; for (auto coord : xrange_2d(1, 4, 1, 5)) std::cout << coord.first << ", " << coord.second << "\n"; }
https://repl.it/repls/MildArcticProprietarysoftware
Not that I suspect that's the right solution for OP here.
Yes. Generally the server responds a minimal index.html page that has one div and loads your js bundle which kicks off React and attaches to the div. React handles it from there by creating something called the Virtual DOM which turns your Javascript/JSX into HTML.
All of the official React Getting Started docs are wonderful, but I think this guide might be the best introduction to the concepts: https://reactjs.org/docs/hello-world.html
You can also do server side rendering where you basically run your React bundle on the server and send the result HTML, but this is usually only for the first request to speed up that initial render. From then on it's the same thing with client-side React components responding to user events, make requests to the server for data, and updating the DOM in response. All without a page reload.
There's even routing, which can handle browser URL changes without having to refresh but still accessing any param data in the URL and letting the browser back button do it's thing.
As a front-end programmer, now I'm pretty much building a whole application with the server as my data source rather than a series of HTML pages like it used to be.
This might be impossible. It depends on how much the device vendor has locked down the internal firmware and hardware. Also, unless someone has done it already, the following is incredibly difficult, even if it is possible.
The process is similar to how you would root and android phone and install your own operating system.
Figure out how to flash the device with a new firmware
Hack the flashing program so it accepts firmware that isn't approved by the device vendor
Write your own firmware that implements the functionality
OR
Write your own firmware that allows you to install your own software, and write software that does it.
Alternatively, you could just do post-processing to do the desired effect. For example, using a camera connected to a computer or a mobile phone.
C / C++ is very common for microcontrollers because it is easy to support. Just need to provide a slightly modified C/C++ toolchain & you're done.
Building MicroPython support first requires C/C++ support, then additional work on top of that. Hence most companies do not bother.
Other languages that might be supported include JavaScript and Rust.
Either:
Click on "formatting help" in the bottom right corner of your text input and format the code correctly
upload the code to pastebin, privatebin or an alternative like jsfiddle or codepen for web stuff
Also, post relevant information which is often times:
Basically, put yourself in the shoes of somebody who has no idea what the hell you're talking about and provide enough information for them to have an idea of what the hell you're talking about. We aren't idiots here, but we aren't seers either.
Finally, learn how to debug yourself. Learn how to set break points (conditional breakpoints exist too), print log messages and read stack traces. Possibly even create your own stack traces by throwing exceptions in conditions that you suspect will trigger errors later on in order to find out who called what. Every language should have that possibility, even VB.
Hopefully the "boot to basic" UI would look like PICO-8 https://www.lexaloffle.com/pico-8.php
Built-in text editor, built-in sound fx editor, built-in "midi" editor, yet still "boots to basic".
most likely you'd be using something like http://opencv.org/
in which case, you can use c/c++ or python. if ultra performance is something you're interested in, c/c++ might be the better option.
... but what most people fail to understand is that you need to know a lot about c/c++ before you can even think about expecting your c/c++ app to perform noticeably better than something written in c#, java or python.
the extra development time is generally not worth it.
I'll admit I don't really know the answer to this, but it's an interesting questions, so I'm going to go ahead and speculate.
I think that existing "porn detectors" basically just go by looking at the percentage of pixels in the image which are flesh-tones, and flagging them for review. Less naive ones actually check that the flesh pixels are contiguous.
To do what you are talking about means getting into computer vision. You probably want to look into the OpenCV library, specifically the object classification. You'd need a large quantity of training images (that should be some fun research) - remember to use separate training sets for breasts, female genitalia, and male genitalia.
The actual pixellation can be done just by resizing the relevant section of the image by a factor of say, 20%, and then blowing it back up to full-size (500%).
I'd stay away from flash for now, it's dying off and you can't use it everywhere (iPads for example). That being said, if your game is realtime you can use all JavaScript.
There is a new technology called WebRTC that allows computers to connect to one another using JavaScript. A very nice library for working with it is Peer.js.
Of course, your game wouldn't be 100% cheat proof if it's all client side, but that would be okay if its friendly. To begin with, I'd work out the JavaScript of building your game between two people using Peer.js. Sending messages back and forth as to who has what card, what cards are visible and where they are on the playing surface so you can move them around.
A long time ago I built a node.js application that let you play checkers with someone else. One person's web page would contact the server and open a websocket, same with the other person's, and when a piece was moved, jQuery would send the data over the two and it would show up on the other side. I used socket.io for that.
Cheers!
Edit: All of those technologies have some awesome tutorials.
On website == actually 2 distinct parts, the backend and the frontend that runs in your browser. The browser can only run JS (and recently WebAssembly) but many languages can be transpiled to JS. So unless the website offers source maps you can really only guess or assume it's done with just JS.
For the backend the situation isn't any more clear. You only receive HTTP messages, with HTTP being a language-agnostic protocol for which there really are implementations in any language. Your best guess are heuristics since some HTTP backends behave in a certain way. For example if paths such as /typo3/
or /fileadmin/
are available it is extremely likely the backend uses TYPO3 which is built upon PHP. Similar specific aspects are known for a lot of reused CMSs/eCommerce platforms, some frameworks etc. But if a website does not expose such information you really cannot know which language it uses for the backend other than by asking the authors.
They're generic types.
Think of an Array. You could have an array of strings, an array of numbers, or an array of any other type you define. The way you tell the Array what type of object you want to store in it is via generics.
const stringArray: Array<String> = ['hello', 'world'];
const numberArray: Array<number> = [7, 42, 666];
In the example above, the type FunctionComponent
takes a generic type variable T
, which your code sets equal to Props
. If you go and examine the definition of FunctionComponent
, you'll likely find the generic variable T
(although it could be named something else), and throughout the definition, where T
is used, Props
will be substituted (for your example).
> inp = str(randrange(1, 20, 1))
Why are you not simply using randint(1,20)? And why are you converting it to string?
> if inp < 20 - int(a) - int(b) - int(c)
you explicitly set inp to str above, my gut feeling says that python does not auto-convert strings to ints, and comparing anything to a string (other than another string with == ) probably yields false.
PS: yep, gut feeling is right ...
> foo = "20" > bar = 20 > foo == bar > => False
tested via https://repl.it/languages/python3
I've used both Git and Mercurial extensively in professional environments, and I promise you that Git is what you want. The way branching is designed in Mercurial is an absolute travesty. The branching system in Git is far more intuitive and much less prone to error.
Some might argue that Git is "harder to use" than Mercurial, but really Git just makes it harder to shoot yourself in the face. Mercurial on the other hand will happily let you make a complete mess out of your revision history's branch structure; for example, you could have multiple "heads" for the same branch name, meaning you effectively have two branches with the same name, and it can be a major pain to sort out that mess.
There are plenty of Windows GUI tools for managing a Git repo, most of which I would say are even better than TortoiseHg. The most popular one is probably git-gui. You can also use the Github For Windows app, even for git repos which aren't hosted by GitHub.
I love my current job, but waking up every day and needing to use Mercurial tastes like ashes in my mouth. I didn't care much for Git when I originally started using it, but now that I've been stuck using Mercurial, I miss Git so badly. I do side projects on my own that use Git, and it feels so good to step away from Mercurial for a little while every now and then.
I will be perfectly honest.
Eclipse is fantastic for writing pure Java applications, i use i every day and is great. BUT, I have found eclipse is GARBAGE for web. It wasnt meant for web, it kinda works but its hacked in.
I use VS code professionally at work at my job, we build websites, Angular ionic mobile apps, and node services, its been great. https://code.visualstudio.com
A lot of people are fans of Visual Studio Code, which is free. I tend to use Sublime Text, in part because it's still more efficient than Code. But Sublime doesn't get updated very often. It also costs money, and it's not cheap.
But for most of my coding, I work in an IDE. Visual Studio (not VS Code) at work, and IntelliJ at home.
There’s a great book that discusses this called The Problem with Software: Why Smart Engineers Write Bad Code.
The doctor analogy doesn’t hold because computer science courses at colleges do not teach the technologies and concepts for new grads to start doing the job on the same level a new doctor (i.e. first year resident) can.
Medical degrees are extremely standardized and hospitals are confident that when students graduate, they will be able to do x, y, and z, or they wouldn’t have passed.
We are not taught in school how to understand, meaningfully contribute to, and write maintainable code for large projects using git. Most of what the entire industry does every day - read their colleagues’ code and write their own that can in turn be maintained - is not addressed, so how can companies be sure we will be able to do that?
Another example the author gives about how software engineering differs from other engineering disciplines goes something like: if you’re paving a road in Alaska as a civil engineer, you have specific industry standards down to the composition of the paving material, which accepted techniques are available, what are pros and cons are to paving during certain temperature ranges, etc.
Barr ultimately lands on software engineering being a still-nascent field. The best practices for code are being set up slowly. Research is needed into what is the most maintainable and bug-free way to do certain things.
A podcast he was on (which includes a convenient transcript) is here for more info.
So some would say do online stuff with codecademy or similar. Personally I would suggest you get one of the following books and learn through trial and error, everyone is different.
Head First Java, 2nd Edition
Java in a Nutshell
Thinking in Java
Think Java
Introduction to Java by Sedgewick
All are pretty great resources. There are others like on youtube.
But at the end of the day just get started. Feel free to ask me follow-up Qs
One of the greatest companies--when it comes to coding--believe it or not is Microsoft. They have a book on good coding practices (and life as a developer in general) called Code Complete which you should check out. I think it was available online if you're a member of the ACM, or you can pick it up at thrift stores/Amazon/the library quite often.
I would also read every design pattern on the Wikipedia list, it'll help you tame complex code and approach things in a more systematic way; even if you don't use them all the time they can be lifesavers.
Java is a good language, there is a lot of hate towards it but that means people actually use it. The languages nobody hates are the ones nobody uses. If you need to write something 1000+ lines of code I'd definitely recommend it. Python is good for smaller stuff, but it has the tendency to become difficult to understand for bigger projects because of the lack of types i.e. you need to fit the whole program in your brain.
edit: One more thing--you should never be happy with your code, every time I look back at old projects I have the "what was I thinking?" face on. It means you've grown as a developer and that's great. :)
FYI, there seems to be windows headers and readme calls for POSIX, not unix, so I think it's supposed to compile with Cygwin or MinGW.
Generally, it's
Get familiar with the way files are organized. Find which are configs, core code, helper functions, platform-specific code, dependencies and build system.
Look up dependencies. Things like UI libraries and plugin interfaces work the same way everywhere.
Find entry point and logic related to APIs in the code and start from there. Or locate something that looks like program core functionality.
Follow classes and function calls using your favourite tree traversal, with attention to control flow. Often, especially in C, it means reading code from the bottom of the file to the top.
Read each chunk of code top to bottom to understand what it does and how important it is.
Try again later.
Send a (polite!) email to the developer when you're really stuck.
Did you add Oracle ODBC object to your project? EDIT : this should help https://stackoverflow.com/questions/12568100/connecting-to-oracle-database-through-c EDIT 2: It would be better if you create your own DB, the standard one when installed is not for tests. :)
You can use git stash
and git stash pop
for this issue. Basically this puts all your changed on a local "stash", so you can do any operation you want (especially those you cannot do when you have any current changes) and apply your stash after you have done these actions. You can also read more about it here: https://git-scm.com/docs/git-stash
But basically for you this should be enough:
git stash
git checkout my-branch
git stash pop
+1 here, this is good advice /u/sah_nzr .
One caveat: I have not met anyone in person who uses the graphical git clients for everything. They all primarily use the command line and sometimes open the graphical client for things like merge conflicts.
The built in Git client in IDEA is one of the better ones I have personally used. But it is cumbersome for a lot of things so I find myself mostly calling git from the command line.
The git command line is totally usable in Windows as well as Linux/Mac, see this article on customizing powershell with git.
It depends what OS you guys are using as *nix based systems line linux/MacOS its easier to use the command line, but this client would work https://git-scm.com/downloads
I would recommend you guys do use Github. You all will need accounts, and one of you can create the repository and use a tutorial to figure out how to upload a project to git. In Github you will be able to manage access, where you can give you class mates access to the shared repository
If you want to save process state and then restore it in future - it seems that such functionality should be implemented directly in the operation system (to restore app all handles to external resources should be correctly restored/reestablished) which isn't the case. The only thing that can be done is one VM for each app, like qubes-os.
There is a question on the superuser.com where you can find more information, even it's from 2011 I think nothing is changed.
Python would be a pretty straightforward choice in that case. To help, Coursera has a new session of Introduction to Interactive Programming in Python that just started. It's free, targeted at beginning programmers and will teach you all the basics you'd need for your project. Good luck!
Those tests really are terrible.
Do you know any programmers that might be able to conduct the interview?
The other commenters here have very good suggestions about architectural stuff which is part of being a good developer. But actually rating their coding skills, when you can't understand what they are saying, will be impossible.
There are lots of websites out there that offer solutions but they seem to cost a lot of money. Codility is a basic screening website to give pre set challenges to programmers, but will not give you the difference between an amateur and senior. I've just seen something called Intervio which apparently takes senior people to do interviews for you. God knows how much that costs.
Here's a rough draft of the code, reformatted into async style, mostly untested because I'm not getting paid for this XD. I left some comments.
Hope that helps! Also: Like others said, please format your code better in the future.
if you are on windows you could use the find and replace tool called "fart" It is a single exe and I have used in batch files a few times. I know the name is silly but it works well.
I wouldn't use someone else's live assets for a demo, especially if you're putting this out in the wild, regardless of intent. Considering the potential legality issues, there just doesn't seem to be an advantage to using existing, copyrighted art.
Put another way, if I was reviewing a candidate's portfolio and saw that they'd used McDonald's and Wendy's art, I might have a brief chuckle, followed by the nagging thought: "I wonder if they'll try to use unlicensed CSS and images on my site?"
You might want to look at the Creative Commons, or check if anything suitable exists in the public domain.
It looks like Node added support for the function in v14, you should make sure the buildpack you're targeting is using that version of Node.
What's the problem you're having with them? Telling us is it the only way we can help. There's no reason to be vague about it. Also, please don't ask people to PM you to be able to help you. Just link the tutorial.
Hey, Here is your new best friend https://trello.com/ :) Distributed sticky note machine that can be as versatile and as flexible as the standards you put in place with your team (of 1 in this case).
Obviously its difficult to implement all of the agile practices in a 2 man team but you can go a good way towards keeping a developer structured in a small environment with the potential to introduce further developers along the same process chain.
Ideally I think you should sit down and explain the overall picture of the business requirements. Once you establish the overall "epic" picture for what is being delivered it can be tasked out, planned and estimated in a realistic way.
Weather underground, hands down! https://www.wunderground.com/weather/api/d/docs
Couple that with the fact that private weather station owners can register theirs with the service and you've (probably) got the best coverage for a weather api anywhere
Looking at the modern web, I think it's pretty clear that people are willing trade performance for aesthetics. If not, every site would probably look something like craigslist or software blogs.
Ah, no.
Git adds an extra layer of indirection to the commit process. When you make changes to files, they are visible as changes in git status
. But if you were to commit at this point, nothing would get committed. That's because you have to first "stage" your changes (to an area called the Index). When you perform a regular commit (via git commit
without naming any files), only the changes that are staged will be actually committed. That allows you to, for example, make changes to a bunch of files but to submit them in smaller chunks.
When you git commit *
, you're asking Git to ignore the Index and instead directly commit specific files. But git commit *
is not the same as "commit all files in the repo"; rather, it means "commit all the files in the current directory only". I think the glob pattern you would want for "all files" would be ./**
(assuming you're currently sitting at the top directory of the repository).
A useful command is git add -A
, which will stage all files in the working tree (except those matched by .gitignore
). It's not uncommon to use this workflow:
git add -A git commit
You can try doing http get and http post from a script or an application that runs automatically on startup. Here is an example for Windows using C# but the fundamental idea is not limited to one is
Hth
I would suggest to get a laptop that you'll be comfortable with, never mind what other developers are using. There are plenty of other ways to learn and use Linux without committing to a purchase which you might regret as soon as you have to (e.g.) google how to configure your Bluetooth module.
>I have been told I would need to use python to connect my database with the Java script I was hoping I could get detail on how to do that?
You don't need python, you need some language.
Also unlike the other guy, do look into python, especially for what you want it's pretty easy.
I recommend flask:
and sqlite3 for connecting with the database:
What have you tried so far? Here's how I would approach it step by step, assuming you haven't done any of the assignment yet:
n
times, putting n
user-given strings into an array.n
number of strings, and instead test whether the given string is "end" (ignoring case, this will be helpful).substring
will probably be your friend here.compareTo
is mentioned above, and you should make use of it. If a.compareTo(b)
is negative, a
is "less than" b
alphabetically, positive means a is greater, and 0 means they're equal. If a
comes before b
in your array, and a.compareTo(b)
is positive, then there's a problem.Alf | Chloe |
Bob | Dylan |
Heather | Michael |
John | |
Zoe |
> Each entry point will be a dedicated node in the AST, which I think is what your trying to ask. Using python as an example, each function is a separate node. ... Moving up from a class node we may have a module node which contain class nodes, and module level meta and variables.
You kind of say the right thing later on, but start off on the wrong foot. If each function's AST was separate, there'd be no "moving up" because you'd already be at the root of the respective trees. Rather, each function's AST is a subtree in the overall whole.
OP, what will typically happen is each file will correspond to exactly one AST (root). For example, go here, make a trivial edit to the code (otherwise it won't update the virtual file), and press run -- you'll see the AST for the file. (You could I guess theoretically consider any subtree of an AST to also be an AST, but I don't think this is what you mean and it'd be at least a little unusual.)
It's difficult to give a general answer, but most languages either have some extension mechanisms (aside from writing libraries in the language itself) or, as u/raevnos mentioned, allow importing of external binaries, C-style calling being fairly common.
If you want a full language bridge, you either have to forward all of the functions, or, if you're lucky, use reflection or dynamic evaluation.
As far as Node is concerned, it's written in C++ and supports native addons.
You might want to try Progression FYI it lists lots of big company standards and career paths. Also check out Gitlab's engineering handbook
They have an API that should let you access the information programmatically. (Not sure if you can get your info through it or if it's only for the customers use.)
Not sure the details on how to implement it.
Maybe try contacting them and see if this is the best route. They may have some functionality that is set up for this already or a better idea of how to do it.
Not sure how you get the information or what format it comes in. Android lets you copy and paste text so you could copy the order and paste it into your own app that parses the data. You could try this for printing from your device. Not sure how your tickets are printed. maybe your app could let you manually select the label from a list of labels.
If you want to take a stab at app development then get android Studio. It's free and good. And you'll have to program in Java.
If you're like me and can't think of things to program, a good place to start are these sites
projecteuler.net These are problems of increasing difficulty and are good exercises for learning a new language
codegolf.stackexchange.com These are exercises meant to write code in the fewest character as possible. But they are also good for learning a new language
Python seems to be a good starting place these days. It's very versatile, including being popular for data science. It's also a relatively simple language. It seems to have a long future ahead. (This is all secondhand knowledge. I'm mostly a C# developer)
> i'm not really into uploading files on each revision, etc.
Your future self will not appreciate that. In fact, the solution you are describing really doesn't sound very far away from keeping your code in Dropbox or Google Drive (trust me, this is a bad idea).
The best way hands down to do what you want is to use proper version control and continuous integration.
Again: use version control. Force yourself to make disciplined commits, with messages. It sounds incredibly taxing, but it will just become part of your normal workflow. In the process, you learn to build up features from small, understandable, and most importantly, accountable commits.
The workflow would then be:
I'd recommend git and jenkins.
If you are already using version control (it isn't clear from your post), then perhaps you are just lacking some automation. I would suggest that the deployment automation come from a CI server. If you literally wanted the most minimal solution, you could just have a cron job that regularly grabs the latest PHP files from the repository.
Or you can do what OP requested and build an installer that packages the others together and then runs each one in silent mode.
I suggest using NSIS, but that's only because it's the only installer i'm familiar with.
That is the lastest version in Wayback that isn't 404'd. The language is discouraging (at least for anything beyond experimentation) I'm not sure if it's the version you'd intended to link or not.
> we currently teach Java to Freshmen and Sophomores utilizing the Applet class
you are horrible horrible people ;)
For your requirements, maybe Logo would be a good choice. Here's a great implementation.
Also I am slightly confused, are you teaching Freshmen or Kids? In the 1st case I think you could go into something more challenging like python and not necessarily with a gui.
/r/techsupport has a "Which AV do I use?" link in their side nav which points to: https://www.av-comparatives.org/
probably trustworthy.
i haven't used antivirus in about 20 years (aside from windows defender i guess).
So HTTP is just a protocol for communicating between a client and a server. To create a server that handles HTTP isn't too tough, you'll need to make your server to continuously listen for new messages on a port and respond appropriately. Start small by handling GET requests, you're not trying to make a browser so all you need to do for responses is format it appropriately and fill the body with the string of the HTML. For technical specifications check out https://tools.ietf.org/html/rfc7230
<tr>
and not </td>
Here's a jsfiddle with 1 and 3 fixed https://jsfiddle.net/52fpf3ox/, in your real code you'll have to import jquery as described here -> https://developers.google.com/speed/libraries/#jquery (assuming you don't want to self-bundle it)
The Java VM needs to be available on your PC to run Java programs, there's no way around that. You can install it or it can be embedded in the program, like minecraft does. The Java runtime is still there in that case, but it's just hidden away within the program files
Java exe wrappers can wrap your jar file into an exe so it has an installer and looks like a regular windows program and stuff, but behind the scenes it's still java code running on a Java VM
I wouldn't bother. Go to your local library and check out a book on it or buy one from Amazon. Microsoft also has tutorials on asp.net, they go over MVC, web services and azure. In a way, I trust Microsoft more because they have financial incentive to make you happy with their product.
There's nothing wrong with using csv files for storing small collections of records. A database will start to come in handy if you ever want to store large amounts / perform complicated queries on your data.
A nodejs application would work. Many existing tools use a locally hosted web server to provide some kind of ui. As long as the server never exposes itself to the internet (i.e. only bound to localhost) - you will be fine.
NodeJS has the expressJS library which will take care of generating templates, starting the server etc.