I am new to coding 100%. I am trying to make a simple stopwatch app in xcode using swift language. The error occurs once the code gets to the "let strMinutes = minutes > 9 ? String(minutes):"0" + String(minutes)" line.
Please help
import UIKit
class ViewController: UIViewController {
var ti...
only when you hear that once-a-month I then copy the entire 4TB snapshot system on to external drive.... and store it off-site... ;-)
The photographs, along with home-directories for each family member, and the /etc/ folder and database backups from mysql, etc... are also all copied there (both the hourly snapshots, and off-site).
So, what I have done, is set up only one computer that's important.... all the other machines in the house use that as either a direct "My Documents" folder, or have a clone system back to it...
that way I can trash/lose/break computers all over the place, and only need to worry about being careful with one of them
it lives in a locked room.... with UPS, network, etc. the cat, kids, and even my wife know to stay away ;-)
I pulled it open to clean/vacuum it earlier, and it was "clean" anyway.
What is the time complexity for the code below? My answer is n*size_of_list
def sort_it(lst):
if is_empty_tree(lst):
return []
else:
c = []
for i in lst:
c = insert_tree(i , c)
b = flatten(c)
return b
My flatten is time comple...
I have written the following class which is part of a pagination system in Wordpress. The class works as expected and also works as expected when used in the system.
Just as background, the class performs the following task
Takes an array of post ID's and creating links to the posts which ID'...
Anyone around ever built a program where people have to log in to use it?
I'm planning on adding quizzes where you can either take them anonymously or log in and track your personal stats, and I'm not sure about how to keep people's data safe.
Of course, I know better than to store passwords as plain text, but I'm not sure where to go from there.
I was wondering about the best practices for indicating invalid argument combinations in Python. I've come across a few situations where you have a function like so:
def import_to_orm(name, save=False, recurse=False):
"""
:param name: Name of some external entity to import.
:param sa...
I don't have ones to recommend since I'm not on a computer, I've tried some services before and VPS's might be better for the situation than dedicated servers
@Unihedro if you have a "remember my password" option, that can't be stored as hash + salt. Unless you of course store the actual server-data on the client as well, which is not a good solution IMO. I think encrypting is a better way for that feature.
@SimonAndréForsberg Isn't "remember my password" done with a cookie with a token for a client which expires when the user logs in with another machine.
Okay, I see how you mean, @Unihedro. I think there's a difference between "Keep me logged in" and "Remember my password" here. What you're saying sounds more like a "Keep me logged in" feature.
I've created a function in C to reverse a singly-linked list in place:
node* inplaceReverse(node* head, int index) {
if(!head || !head->next) {
/* Indication of last node (or empty list). This will be recursively returned to become the new head pointer of the reveresed list. */
...
I have a weird issue. I am not sure what I am doing wrong. I am doing a Windows Phone 8.1 Silverlight app project that (for now) has two pages. Page1.xaml has a Welcome page with a button, that, when clicked takes you to a second page with two textblocks one LongListSelector and one textbox,that ...
Does the code you present here (and want improved) work to the best of your knowledge? Because then you might want to check out codereview.stackexchange.com . Over there people give suggestions on how to improve working code. Before posting, please read their rules Additionally it is not acceptable to ask multiple not inherently connected questions in the same question. Please try to reformulate your question so you're asking for a single thing ;) — Vogel61230 secs ago
this is the code i wrote to solve
1-20 of K&R Exercise 1-20. Write a program detab that replaces tabs in
the input with the proper number
of blanks to space to the next tab stop. Assume a fixed set of tab stops, say every n columns.
I think my solution it's not bad, i used the na...
Welcome to Stack Overflow. Please take the time to familiarize yourself with the Stack Overflow help file, which will help you understand what kinds of questions are appropriate for this site. This site is intended to help you obtain answers to specific programming questions, as opposed to providing tutorial, design or code review assistance. — MarsAtomic1 min ago
The Code
The project can be found on my github account: https://github.com/bajuwa/GoodMaowning/tree/develop
The main file you will be interested in is src/good/maower/Maower.java
Other files include the Ant build.xml, properties files, and README for context
The Design
The project itself will ...
@nhgrif Nevermind the screenshot... I think the problem is your blockquotes display as the default serif font (usually Times, which looks like shit italicized)
blockquote {
font-family: Georgia, Times, "Times New Roman", serif;
}
Good. One other small thing I notice, should be easy to fix
<blockquote><p>Comments should be very rare and valuable, almost always expressing the “why” and never the “how” (the exception being when the how is complex and not easily discernible from the code).</p>
<p>Every comment is a hint that you may need to refactor to make the code’s intent clearer. Every comment risks becoming out of date as soon as it’s written.</p>
<footer>- <cite><a href="http://stackoverflow.com/a/111574/2792531">Brad Wilson</a></cite></footer>
Welcome to Stack Overflow. Please take the time to familiarize yourself with the Stack Overflow help file, which will help you understand what kinds of questions are appropriate for this site. This site is intended to help you obtain answers to specific programming questions, as opposed to providing tutorial, design or code review assistance. — MarsAtomic1 min ago
Hello I just did CodeChief's candy splitting task here and my code is working even with alot of test cases and big numbers but it uses way too much memory, when I checked my submission it was 1342M which is alot.
So here is my code :
import java.util.ArrayList;
import java.util.Scanner;
class ...