Alright, there appears to be an issue with crashing on at least OS X Yosemite. If you are on Yosemite, and you are incapable of starting the game, leave a response to this comment. Please also retrieve crash info from the dialog box that should hopefully appear whenever apps crash.
Info will be passed along to Valve after a few reports come in. If you're on Mavericks, Mountain Lion, or earlier, and you aren't crashing, please also respond saying so. If you are, follow those steps above.
Your username is scrubbed from the reports and is replaced with "USER", so don't fear.
I thought about a solution for the Audible icon problem. It has its pros and cons, but here it is.
If you go to this link: sorlie.co.uk/audible, press the share icon, and press "Add to homescreen" it will save an audible bookmark that will automatically redirect you to the audible app. Screenshot of the shortcut on my homescreen
Of course, the way this works is that it briefly goes to my site every time you launch it, which might not be ideal, so I have uploaded the source here as a single HTML file that should work on any server..
You might not like this solution, but I thought I'd throw the idea out there anyway.
Here's the description from the video itself (I'm not the author.):
Andrej Karpathy's "NeuralTalk" code github.com/karpathy/neuraltalk2 slightly modified to run from a webcam feed. I recorded this live while walking near the bridge at Damstraat and Oudezijds Voorburgwal in Amsterdam.
All processing is done on my 2013 MacBook Pro with the NVIDIA 750M and only 2GB of GPU memory. I'm walking around with my laptop open pointing it at things, hence the shaky footage and people staring at themselves. The openFrameworks code for streaming the webcam and reading from disk is available at gist.github.com/kylemcdonald/b02edbc33942a85856c8
I tried to decide some times ago. In the end my preference goes to Yesod. The advantages are tiny and most subjectives, here are the reasons:
Hamlet is almost Haml, Cassius is almost SASS, Lucius is almost SCSS and Julius is javascript with type safety added. And type safe is good.
Yesod is almost at its 1.0, from now, yesod 0.9.2 is more a realease candidate for the 1.0
Contrary to the examples given in the documentation, most of the time you don't use quasiquotation.
Greg Weber (one of the main Yesod contributor) was the first to give a way to deploy yesod (and more generally Haskell) to heroku.
Widget is a very clever idea I never saw anywhere before.
From what I understand you can use many part of the yesod web framework inside snap and conversely.
Also, from some benchmark, it seems the standard way of deploying yesod is a bit faster than the standard way of deploying snap. But, I also believe you can use each method with snap and yesod.
I didn't looked at snap neiver at happstack from some time now. But to be short:
You should read the introduction of the yesod book.
Also here is an example that proove yesod rocks. Recently, somebody posted a troll article "node.js is cancer". He gave an example of with a fibonnacci function. Somebody answer that haskell might be the cure and used snap to demonstrate its point (http://mathias-biilmann.net/posts/2011/10/is-haskell-the-cure). Here is the equivalent solution using yesod:
http://gist.github.com/1261882
Its behaviour is perfect as expected. Only the first access is long. Once the fibonnacci value is calculated, the answer is cached and served extremely fast.
As the code is minimal I used quasi quotes.
I have the same laptop as you, OP. I have some code that will work with your keyboard LED's if you want it.
Make sure to install nodejs and npm from your package manager. Make a folder called "keyboardled" in your home-folder, then open terminal. Type this:
cd keyboardled
npm install --python=python2 msi-keyboard
Keep terminal open and download that file as "flow.js" into that folder you made. Then, in terminal, type:
sudo node flow.js
That should get your keyboard changing colors. Hit Ctrl-C in terminal to stop the colors, and just type
cd keyboardled && sudo node flow.js
to start it again.
Cemeteries were one of the things that the Silph Road research team collected data about, and they didn't notice any statistical differences. I'm not sure how big their sample size was, but one of the things they said was that they found 0 Ghost Pokemon. It may be that cemeteries are only differentiated from other biomes so that ghosts dont spawn there, as that could cause some controversy over disrespect (like the koffing in the holocaust museum).
This is my source for the list by the way, though I'm not sure the original source of the datamine.
Dude, you are awesome. Keep going. I have just one little tip for you. Please, do not post screenshots of your code. It's better to use something like Gist by Github to publish short portions of code or Github/Bitbucket for bigger projects. It makes code easier to copy, edit and gives you an opportunity to track changes in it once you will learn version conrol systems like Git.
Sorry, but you need to put way more effort in your posts if you want to get proper help.
We, as commenters should never need to ask you as poster for extra information. It is your responsibility to provide it in your original post.
Preparing a well designed, proper post is some form of appreciation of the work that others will do in their spare time to help you.
> but i wish somebody could respond me with a proper answer instead of just commenting about the lack of space or about how bad formated it is.
You do understand that it's you who needs help right? Don't you think it's a tad rude to tell people to not complain about stuff that you should be getting right?
Regarding your code: it's obviously not working. You got a Thing class and in some places you misspell it as Ting. Oh, and you seem to define class inside your main() method. That's not going to work at all. Methods go inside classes, not the other way around.
I don't really get how you got this fairly complex assignment without being able to do the most basic stuff. I would urge you to take a step back. Just writing a ton of stuff that doesn't come close to compiling isn't going to work; you're confusing the compiler so much that the errors it will give make no sense at all.
Get a very basic version that compiles and runs first. And make sure you separate classes into their corresponding .java files and use http://gist.github.com to post them separately instead of in one big unreadable mess.
This Stack Overflow post asks for tools similar to valgrind on Windows.
1350 lines isn't that much, consider putting it in a gist so we can have a look at it, too. You could also try to run your program on Linux, there you can use valgrind (which is really easy to use).
andrewroycarter has it absolutely right. You just set the "separatorStyle" of the tableView. The way I did the vertical thread lines in the comments is that every cell is responsible for drawing it's slice of the thread lines.
So a single cell would draw something like this:
| | | | Lorem ipsum dolor...
Those vertical lines then all line up together from each row, and it gives the thread lines a continuous appearance.
Here's the code that draws the thread lines for each level. You just call this from your drawRect.
Remember: >To participate, add your solution to a public Gist (http://gist.github.com; you’ll need a free GitHub account, which all PowerShellers should have anyway). After creating your public Gist, just copy the URL from your browser window and paste it, by itself, as a comment on the PowerShell.org post, not this Reddit post please.
The Puzzle
Write a one-liner that produces the following output (note that property values will be different from computer to computer; that’s fine).
PSComputerName ServicePackMajorVersion Version· BIOSSerial · · · · · · · · · · · · · · · ·-------------- ----------------------- -------· ---------- · · · · · · · · · · · · · · · ·win81· · · · · · · · · · · · · · · · 0 6.3.9600 VMware-56 4d 09 1 71 dd a9 d0 e6 46 9f
By definition, a one-liner is a single, long command or pipeline that you type, hitting Enter only at the very end. If it wraps to more than one physical line as you’re typing, that’s OK. But, in order to really test your skill with the parser, try to make your one-liner as short as technically possible while still running correctly.
Challenges:
•Try to use no more than one semicolon total in the entire one-liner
•Try not to use ForEach-Object or one of its aliases
•Write the command so that it could target multiple computers (no error handling needed) if desired
•Want to go obscure? Feel free to use aliases and whatever other shortcuts you want to produce a teeny-tiny one-liner.
Good luck everyone!
First of all, why is this a .txt file? Second, why make people go through more trouble than they have to just to help you? I don't want to download this just to look at it because I shouldn't have to. Upload your code to somewhere like http://gist.github.com or other sites recommended by the sidebar, such as ideone.
If you want people to test it out, don't upload a jar. That is the biggest nono because unless you have a credential behind you, noone will want to test possibly malicious code. This isn't an attack on you as much as it is a suggestion in mannerisms. At the very least, post your source on http://gist.github.com
I don't think you can do it using only formulas but you can do your own formula.
Add a module to the workbook with this code and you will have a formula called MERGEVALUES that does that. It will use 2 parameters: the range of cells and the delimiters. Example: MERGEVALUES(A1:A10, ",")
Hope this helps.
EDIT: I realize the code is not the most efficient but I think at least it gets you started.
I would suggest next time you put this in a gist, or in a repository of it's own, and then link to that, rather than posting the whole source in the comment. It kind of clobbers the whole page.
I recommend adding this to your TF2 autoexec.cfg (in Program Files\Steam\steamapps\your_username\team fortress 2\tf\cfg):
It allows you to press buttons on the keypad to perform common tasks like switching classes. When I want to switch classes I just go to spawn and hit 3 on the numpad.
I also bind this to ALT to allow switching loadout faster:
bind ALT switchloadout
// Quickswitch for fast inventory switching. alias switchloadout showloadout alias showloadout "+quickswitch; alias switchloadout hideloadout" alias hideloadout "-quickswitch; alias switchloadout showloadout"
Just press ALT, select the slot with the number keys and then use the mouse to select a new weapon, then press ALT again to dismiss the dialog.
Edit: Forgot switchloadout definiton.
What you’re describing could actually mean any number of things. I recommend posting the code you have so far somewhere like http://gist.github.com, and add comments with specific questions. If we see the code, you’ll likely get an answer very quickly.
You're accessing an array with an index that doesn't exist. Since it's 0 you probably allocated an array to size 0. Show us the code by pasting it on http://gist.github.com and pasting the link here and we should be able to tell you what's wrong.
Aside from that: please read the FAQ and sidebar on asking smart questions.
"Continuous Identities" are the very next feature being released. Everyone has been asking for their own identity and name (but anybody can still use any name at will, with your key/hash being unique to prove yourself is optional/voluntarywism), and we got a yes <3
Pretty Good Privacy (PGP) has been used fine so far (by their developer, to prove who they are) so if you know how you can still securely research and develop with crypto there now, if you got distributed with enough nodes (or maybe copy the database pastebin to www.archive.org, www.archive.today, www.webcitation.org, http://gist.github.com and www.bitbucket.org/snippets for redundancy))?
To your question, yes, std::ostream::put()
puts a single char
^1 to the stream, while std::ostream::operator<<()
(which I guess you mean by cout, which is actually just an instance of std::ostream
) does all sorts of fancy formatting. You can use the <<
operator with files too (see, it's actually quite clever that files and std::cout
are both std::ostream
), or you could use eg. std::ostream::write()
1) note that to write numeric values in human-readable form, you need to do some formatting, either with streams or with sprintf-family functions (or something else). Remember that '0' != 0
It's impossible to truly tell what's on line 25 seeing as you didn't post your code properly (either post it properly on reddit using 4 spaces at the beginning of each line or post it to pastebin or as a gist.
However looking through your code I'm pretty sure that
df.format(nf);
is the line causing you problems. I'm thinking it's that because you can't format a NumberFormat as a DateFormat. I can't even imagine why you'd do try to do that.
TL;DR: I don't know.
But I might be of some service. First, reddit ate your formatting. It's pretty hard to try to figure out what your program is doing when we can't read it. You can make something look like code
by prefixing it with four spaces, so
<space><space><space><space>REM MOVE HAPPY SPRITE
becomes:
REM MOVE HAPPY SPRITE
Importantly, that'll also preserve how your lines are set up. But it's a bit of a pain to do that to every line, so you might just want to write a gist and link to it.
But the other (and bigger) problem here is that BASIC is not a very standard language... at all. Pretty much every dialect does its own thing outside of a few common keywords (e.g. REM
you'll see everywhere, but this particular kind of SPRITE
is specific to LowRes Coder).
What that means is that, even if we can read the code perfectly, we don't know what SPRITE
does. We don't even know what the coordinates mean (is it X, Y or is it row, col? If X, Y, is the origin in the lower left or the upper left? That kind of thing). In short, LowRes Coder is a very specific dialect of BASIC and there aren't many folks here who are going to know it.
Your best bet is to find a LowRes Coder-specific community: The reviews mention that there's a decent following and it appears to be popular, so there are people out there who know it.
Sorry I couldn't be more helpful.
First, you get the specific item you're interested in out of the list. For example, if it's the first:
thing_i_care_about = turtles[0] thing_i_care_about.xcor # Do something with this
If you don't know which item in the list is the one you're interested in (or you want to go through every item in the list), you can use a for
loop:
for turtle in turtles: turtle.xcor # Do something with this
Also, in the future, if you're asking questions about your code (like "what's the deal with this error message"), you'll want to include at least a little bit of the code that demonstrates the problem, as well as the traceback from the error. Since reddit will almost certainly eat the formatting, you'll probably want to do this as a gist.
Hope this helps!
No info other than the names of the biomes, but it let people know which areas to test for statistical differences. I got the list from here, but I wasn't able to find where the data dump originally came from.
Your code is nearly impossible to read here; reddit mangled it good. Please post the whole thing in a gist and link to it, otherwise nobody's going to be able to help.
(No guarantees they'll be able to help after you do that, but at least there's a chance :)
> (sorry for screencaps, dont know if/how to do that coding text thing)
for next time, just put it on pastebin, fpaste (no ads!), or make a public gist.
Actually - do that now, it'll make it easier for everyone to look at your stuff. Also, there's no syntaxual difference between the two screencaps...
Edit: This is a Vivado problem, and my reading comprehension could use a hand. I have no idea why the TCL scripts would fail like that - if you know which one it is, maybe the file permissions got a little fucked? If you're just doing sim, I'd lean toward something lighter (Icarus for Verilog-level, etc).
It's hard for me to tell, because it could be your declaration doesn't match your definition due to typos, it could be your makefile is configured improperly, maybe you don't call the right function in your main program file, or any number of other problems. If you can post source files for everything, including makefile, I'd be happy to help you however I can, but as it stands I'm not sure how to proceed. It may also be beneficial to post the output of your error-prone compile; I'm assuming you're getting an undefined reference to function
error, like this, but without more information I can't tell. I hope this helps!
EDIT: please post source in a pastebin, github gist, or as properly formatted code on here (four spaces before every line).
Please, provide your complete method how you read the files. Without that information and without any error messages you receive it's basically impossible to give you solid advice.
Maybe upload the code to gist, or pastebin to make it easier than reddit formatting (one empty line above the code block, each line indented by 4 spaces).
Post all of your code on http://gist.github.com. It looks like the error is somewhere else and the compiler gets confused.
Also: if you want help with issues please don't paste screenshots of compiler errors like that. Compile the code on teh command line (with javac) and post the entire error log.
As I said before, arrays are your friends.
Instead of having individual lvl1
, lvl2
, etc. variables use an array that contains as many elements as you need.
Then you can use lvl[1]
, lvl[2]
, etc. and loop through if needed.
Also, keep the variable names inside the classes the same because they're local to the classes. It's easier to work with them later.
It looks like your individual Levelx
classes should descend from a common, possibly abstract Level
class that could contain the common variables.
Seemingly, the biggest problem lies with the design of your classes.
Again, you haven't provided enough context to give you full advice on the design of your program.
Upload the whole program to http://gist.github.com as it allows for more files. Instructions on how to properly upload code from the /r/javahelp wiki.
Edit you have forgotten to link the class in the main post. Upload everything and link it in the main post, please.
Your player class doesn't have a number() method so it's simply impossible to call the number() method on it. You probably want to call guess() and then access .number (the var, no braces) instead.
Also: please change your code to follow the official naming conventions. Class names should be PascalCased in jave. Vars, member vars and method names should be camelCased. Makes your code much easier to read.
Last but not least: next time please fix your code formatting. Easiest way to post multiple source files is through http://gist.github.com.
Edit: to make it more clear, you probably want to change these sections:
guessP1 = P1.number(); System.out.println("Player 1 has guessed: "+guessP1);
Into this:
P1.guess(); System.out.println("Player 1 has guessed: "+ P1.number);
A neater approach would be to return the number in the guess function (change return type from void to int and add a "return number;" statement at the end.
> Iterated through each point and did a BFS [Breadth First Search] fill on all untouched x's I found. I used BFS instead of DFS because I wanted to be able to scale to larger problems without stack overflow. >
You could also avoid that by converting the recursion into a while loop and have a stack that you put subproblems on, and on each iteration of the loop pop the top off the stack and check it. That way you avoid any risk of going into stack overflow, and you avoid recursion overhead all together.
And thanks for generating the larger input! I like using gist to upload larger files like that. It works up to about 25 megabytes, and it has a nice command line client, so you can do it directly from the terminal instead of pasting the entire thing in the website. And you can get a link directly to a raw text file.
Please, post your current code on Pastebin (single class/file only) or on Github Gist (multiple classes/files) with proper file names (including the .java extension) and Java formatting switched on.
Without code it trying to help you is left to blind guessing which is not productive at all.
Provide the crash info generated by OS X by following these steps:
Your OS X username is scrubbed from the reports and is replaced with "USER", so don't fear.
You've posted 16 lines of code along with an error message that says there's an error on line 83 of ex26.rb
. Can you post the actual code that's causing the error you see? Use http://gist.github.com to share it.
Did you try running the 16 lines you pasted? Do they throw the same error? Do they work as you expect?
These are all things you can and should do before dropping a problem in front of someone else. :)
> It'll basically be a really long comment, unless I can find a better way of doing so.
Make a GitHub account and upload it as a gist: http://gist.github.com/
^(just spamming this idea because why not)
You need to post your code properly. No one wants to read it when it's an unformatted mess.
Either use proper Reddit formatting techniques (http://reddittext.com/) or use a pastebin (like http://gist.github.com) and post the link here.
> Why do this as an image? That just makes it impossible to copy and paste.
Dropped in to say exactly this. There seems to be a subset of the Internet that believes that unless information is conveyed via a rasterized image or a streaming video, it has no value. Plain text is pretty dang awesome on its own, and if you really need formatting you can use Markdown and throw up a gist for all to see.
You can indeed integrate along a spline to find the length. I've fought with splines before and have been meaning to learn numpy/scipy so I've knocked something up - it fits a spline to some data, then takes an arbitrary point in 3D, finds the closest point on the spline, and measures along the spline to the halfway point:
http://gist.github.com/lcrs/ea0001d3542372b2eced http://i.imgur.com/g70MGqi.png
It seems a bit much to have to use so much numerical brute-force to do this. When I looked into analytic solutions for measuring splines, or finding the closest point on one, phrases like "unbearably gruesome" and "do not attempt" kept popping up, but if anyone knows better I would love to hear...
You can use Github to share code (you can embed it in your site as well).
As for the blog post itself, I thought it was ok. I do prefer to read try-and-fix posts like this to be targeted at a project (a la "How I Got Gulp Working in X Project" or whatever), but it was ok.
Not sure about RUBY IN MY /R/NODE THO BRO, COMEON (jk).
It was replaced in a graphic refresh around the retina iPad era, as per the animated gif. It happened after the initial accusation, but we did follow up with Alek at that point in order to try and reach some conclusion (see Derek's email in http://gist.github.com/peppy/8252105).
You should look at jQuery to do all the actual javascript work in a cross-browser-friendly way.
The TLDR here is you want to wrap each content block that you're showing in a div with a unique id, and that id should match the href of the link. Then you show/hide based on that href. For example:
<a class="links" href="#first">First</a> <a class="links" href="#second">Second</a>
<div id="first">blah blah</div> <div id="second">blah blah</div>
<script> $('.links').click( function() { var current_link = $(this), active_tab = $(current_link.attr('href'));
current_link.parent().siblings().find('a').removeClass('active'); current_link.addClass('active');
active_tab.siblings().hide(); active_tab.show(); }); </script>
(In the future, do not post a jpeg of your code - use Gist or JSFiddle.)
Well, on some sites you can switch between "public" and "private". It means that your code is either unlisted or only certain people can access it. I typically use http://gist.github.com/, there's a feature for that, and you can clone the paste with git which is awesome.
Also, slightly OT but check out this script: http://gist.github.com/stormchasing/454c92cfc1b9d6f51468. Works with Chrome and Tampermonkey to automatically check you into Southwest flights as little as 2 (!) seconds after check-in opens. I use it all the time.
Thanks for your suggestion. Assuming it doesn't fix the problem, what is the effect of deleting the Dock's preferences? Does it just reset things in Dock's Sys Preferences pane or something else?
I tried running a Terminal command that I found after some Googling, but that just reset the Dock to its default straight outta install state.
I also found an old comment here that says you can reset the icon cache with this command: "sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;" I have not tried this yet as my CLI isn't quite keen enough to know exactly what this is doing.
Today I noticed that the issue is also affecting a few apps in Launchpad, but I don't really use that so I'm not concerned. I just wanna fix the Dock for now.
Your array declaration is plain wrong.
Arrays are declared as follows in Java:
int[] bullets;
Then you initialize the array by:
bullets = new int[x];
You can also concatenate both, declaration and initialization in a single line:
int[] bullets = new int[x];
The remaining errors are just plain "out of scope" errors. This means that the variable referred to does not exist in the current code block (i.e. the code between the previous {
and next }
).
In your case, the bullets
and bullets2
variables only exist inside the for
loop.
Last, you seem to have a logic error as well. bullets
refers to the bullets of a particular gun and thus you need as many spaces (entries) in the bullets
array as you have guns
.
This means, that outside the for
loop, after guns = keyboard.nextInt()
you need to declare and initialize your bullets
array:
int[] bullets = new int[guns]; int[] bullets2 = new int[guns];
You probably will need to move the declaration to class level, though. It is impossible to tell where the variables should really be declared without seeing the full code.
Next time, when you ask a question, please post the full code in such a way that the lines displayed in the error messages line up with the code. Best put the code on Pastebin if you only have a single class, or on Github Gist if you have multiple classes (gist allows multiple files/classes under a single link). See the Help on how to post code from /r/javahelp (where this question would be better suited, BTW).
In Java, the main method has one argument, String[] args
, which contains the command line arguments passed when starting the program. I'm not sure what you mean by 'the main method cannot read the variables required to run the other classes'. What that sounds like is that when you're compiling the program you're just compiling Asg07.java and not the other files.
When asking this kind of question, supplying the commands you're running and the output you're seeing will go along way. Using a paste site like gist can make it easier to share that kind of stuff (and code too).
Someone already answered your actual question, so I'll show you how to get code to show up properly using reddit formatting (to solve the "There should be underscores" problem you mentioned). There's basically two ways.
Method #1: Four spaces
Any standalone paragraph that you put four spaces in front of gets formatted as code, e.g.
[space][space][space][space]Hello, world
becomes:
Hello, world!
If you're typing in code ad-hoc I find it helpful to either put four spaces on the clipboard and then paste them for this (and additional indentation) or write the code in a gist and then select-all and tab twice to indent it the extra four spaces.
Method #2: Backticks
So that's useful for pasting in code (and solves the if __name__ == '__main__'
) problem you were having above, but what if you want to do what I just did there, and indicate that something is code inline?
The answer is backticks. Anything you include in backticks turns into code, so:
Hello, `world!`
Ends up looking like:
Hello, world
!
(And to display the backtick, you use backslashes to escape it, e.g. "Hello, \`world\`")
It's hard to tell the problem from that log, please set log_level to 2 and provide the output (use http://gist.github.com and give us the link, it won't fit in a reddit comment)
> What's the difference between android and android_new?
'android_new' is a complete rewrite of the original toolchain for building APKs. You should only use 'android' if you have a very specific reason (which you probably don't, when starting a new project, but some recipies may not be ported to the new toolchain yet).
> I don't know what's classified as long code here
The Posting Rules, the Code posting guides and the sidebar define long code as greater than 50 lines.
Multiple classes are best hosted on Github gist as a single gist (one link) can contain many classes (including non-code files, e.g. text files).
Please, do us all a favor and move the code over to pastebin as well. As of right now it's an unreadable mess.
Even better, move the code and the text files over to gist.github.com as this (as opposted to pastebin) allows multiple files in a single link (use the "add file" button).
Please take notice to your naming scheme. Java should be PascalCase for classes, and camelCase for methods.
Your directions reflect the same.
Also for multi class posts, make a gist. This is a rule on the side bar
Edit: Autocorrect sucks. Thank you for the gist formatting
I would say npm is a necessity at this point.
It's also important to know how to use some kind of automated task running process: gulp, grunt, or npm "scripts". I use npm scripts, but that may be a little too advanced for you at the moment, so I'd just get a good workflow with gulp.
If you post your gulpfile into a gist I could take a look and see what may be wrong. http://gist.github.com
Also, why do you feel compelled to use Foundation if you already know how to use bootstrap? If you're learning it for the sake of getting a job, I'd probably focus on improving your regular CSS skills instead.
Great work!
Seems like the output for Challenge #2 is a bit wide for a reddit comment, though. If you want to show off your result in a more readable way, feel free to use a service like gist or hastebin to show it off. I've made a note of it in the challenge description. Or just put it in that nice GitHub repo you used for the problem :)
> The Reddit editor didn't like the code very much so I took screenshots
Reddit code formatting is easy:
If you are using any halfway decent editor, you can just highlight the whole code, press TAB and copy the code, paste it into the submission box.
Other than posting code directly, use either pastebin or Github Gist.
Screenshots of code are awful and commonly a no-go. If anything needs deeper debugging, one would have to re-type the whole code.
I think it's pretty clear you didn't read the FAQ and the sidebar. Please read them before continuing and make sure you understand the bit about coding code on pastebin or http://gist.github.com instead of screenshots.
1. Can you post a gist or your code?
2. Yeah, but there are other ways to stop the submission_stream, such as forcing an error and catching it after a certain amount of time, like here's an unconventional use:
class SubmissionStreamBreaker(Exception): pass
counter = 0 try: while True: # By Default the session is always True for post in praw.helpers.submission_stream(r, 'IAMA', limit=None): count +=1 # do something to posts if count >= 37: # we did something for 37 new posts # it's time to do something else now # raise the exception that was made so that it is # caught and then continue raise SubmissionStreamBreaker('Break It') except SubmissionStreamBreaker: pass #do something else now.
> I'm using JsFiddle as a means to show the code. I'm using Bluej on my computer to process the code.
Using something like gist.github.com, pastebin.com, or ideone.com might be more appropriate for Java code.
> the error is at the for each statement. I'm getting "for-each not application to expression type required array or java.lang.iterable; found java.lang.object"
I'm not asking you what the error is -- I know exactly what the problem is, and how to fix it. I'm asking you to explain what you think your code is doing line-by-line so we can help you reason through your code and figure out what the problem is for yourself.
Did you recently update to Direwolf20 1.7.0? If you did and if a player has an Ender Quarry running, it may be the EnderZoo update causing the lag.
Else, may we please have more information:
-Xmx4G -server
)logs
folder to http://gist.github.comTo format your code on reddit, indent the start of each line by 4 extra spaces (or use a service like http://gist.github.com or http://pastebin.com and link to your code there).
Right now, your code is unreadable due to the formatting.
If you edit your post, we can take another stab at looking at it.
OK, if I were to make a stab at the problem it would be the static Random that you're using as already pointed out.
Try replacing that with
private static ThreadLocal<Random> threadLocalRandom = new ThreadLocal<Random>(() => new Random());
And use threadLocalRandom.Value where you want to use it.
Oh, and try http://gist.github.com for code snippets rather than pasting them in here.
You could draft up some simple vesting agreements.
I found this to be wonderfully informative and insightful, even though the content isn't really answering your question re: brevity. But if your goal is optics, then I feel like the principles therein could be condensed into 1-3 pages.
Note: if I was a serious VC my due diligence would see through flimsy optics... so to /u/SoundofBird's point, it's probably worth the effort anyway. Just make sure you got the vesting. Always the vesting.
The carrier will come automatically with a bunch of markers to outline its location on the map for you, display a given name, as well as a couple of purple rectangles that you can use to rearm the jets or helicopters.
Here is a supplementary script that will give you a bunch of spawn positions inside of the carrier so that you can teleport players into pretty places at the start of your mission: http://gist.github.com/anonymous/b78d218dc5795b2f46ce
Lastly, here is a custom jet rearm/refuel/repair service script that I wrote from scratch. Make sure that this one is compiled clientside, because it will automatically be executed by the trigger that is built into the carrier (the purple marker in the Northeast corner of the carriers' markers):
Please, either format your code, or post it to pastebin, or gist.
Don't forget to switch Java formatting on and use the proper filename including the .java extension when uploading to either of the above two.
Also, add a plain text description of what your code is supposed to do (or of the assignment).
Upload your code to http://gist.github.com along with commentary and share the link. Here's a blog post about learning how to debug that I wrote a few months ago — read it.
> keep track of my improvement by seeing my submissions in a chronological order?
Kind of. Whenever you've modified some code (e.g. you've added a new feature) you 'commit' your code. What you can do when you've made multiple commits is look back and compare to the previous versions, so you can see how you've improved that way.
For small chunks of code you want to share, http://gist.github.com will do the job :)
If you need any help getting this set up, give me a PM and I'll help you out :)
> Everything works perfectly except the Channel B motor. It will start and stop but will not change speed or direction. The Channel A motor works just fine. > > I suspect there's a conflict with one or more of the pins on the Bluefruit LE and the Motor Shield
This sounds like a very accurate hypothesis, best dig out all the documentation for both shields and see if you can rewire something
your code is unreadable though. indent with 4 spaces for reddit fixed-width formatting, or put it up at http://gist.github.com or similar
ps: how are you powering everything? I have an R/C with arduino on it and I got a 3S li-po from hobbyking. I power the arduino, radio, servos etc from the balance plug and the main drive motor from the high current connector, works great. The battery's ESR is extremely low, and doesn't let much noise through from the motor
The severe lag from crafting is a result of an issue in binnie's mods. Direwolf20 1.0.3 includes a fix mod that should reduce the lag and stop the disconnect issue.
As for the FPS issue, my first question is how much ram are you giving to the server and how much to your client?
A log, even if it's not a crash log, would tell me more about your specific setup. Try to get fml-client-latest.log. It may be very large so you may want to use a site other than pastebin, like gist.github.com, Dropbox, or Mediafire
The way your code is formatted is somewhat difficult to read. Try posting your code on something like gist.github.com and share the link.
Alternatively, if you indent the start of each line by an additional four spaces, reddit will format those lines as code. For example, if you type the following into the reddit textbox:
normal text
some code (each line is indented by 4 spaces)
back to normal text
...you'll get output which looks like this:
> normal text > > some code > (each line is indented by 4 spaces) > > back to normal text
Oh, that's not a Fusion Drive, that's just a normal 1 TB drive... Strange. To get some better info, do me a favor and copy and paste the following into Terminal:
diskutil list && diskutil cs list && df
Copy and paste the results to Gist so we can take a look.
Please upload the full crash report according to the rules (it's in FTB/modpack/minecraft/crash-reports/, with matching time/date).
You can upload it on a text hoster such as http://pastebin.com or http://gist.github.com .
Seems you have a NullPointerException somewhere in your RandomLevel class. It happens when you call your generateLevel() method.
If you post your RandomLevel class on Gist, we can take a look at it. =]
/u/escheriv said everything on topic, so I will just add one hint. Your code is going to expand more and more and it will be getting harder for you to post it and for us to read it. I recommend putting it, for example, on http://gist.github.com - it makes it much easier to read the files, mostly thanks to syntax highlighting. And it's just as easy for you, you just copy and paste the text, name the file and click "Add another file".
>Note: To see code how it should be, view the source of my comments.
No. It's not up to us to work at your convenience. You need to post your code properly formatted. But since this includes multiple files, you should use a site like gist instead of spamming your own thread.
Secondly, you haven't asked any question. We're not here to do your homework for you. We're here to help you understand your homework and figure out how to do it yourself. So spend some time with each question and do what you can, and then ask specific questions to get help with an issue you're having.
Fix those two things and you'll have a better time getting help here.
great, so a reproducable bug!
if you now rename the working settings.cfg (forcing the game to create a fresh, default one), does the performance become abysmal again?
if so, put the old one up at http://gist.github.com then edit it and put the working one. github will then allow you to see the specific differences between them. May want to point Squad devs at it too via http://bugs.kerbalspaceprogram.com too
Sure thing. One thing though, don't use screenshots to post code itself, use something like gist. Let us know exactly what you're doing and we'll figure out what's going wrong.
The stream stopped, with no 'CONNECTION ERROR'
This suggests we have all the data, and that we might not have a problem with missing data when the power wasn't there. We'll have to see on that.
Here is the full raw dump, from a connection that never dropped: http://gist.github.com/2578094
Hi.
Port forwarding won't help in this case, so you don't need to worry about that.
Things to try:
If none of these work, open a terminal and run these two commands.
> ping -c 4 c.nerd.nu
> traceroute c.nerd.nu
and post the output to a pastebin somewhere (gist is good)
This is all assuming you're running conventional broadband on a non-terrible ISP. If you're using 3G or something you may be out of luck.
Yeah, it is for a game ;)
Cool solution, hadn't though of the elapsed time part. The only problem I get, is that both keyReleased and keyPressed are invoked, while the key is held. Making the boolean 50% true and 50% false. I am new this, maybe the test I made is incorrect?
There's a bunch of potentially useful windows python tricks here:
http://timgolden.me.uk/python/win32_how_do_i.html
It helped me out once when I needed to recursively change file ownership permissions but Windows 7 would only let me modify one file at a time: example
Take all the advice here and add one more that seems to be missing.
If you're stuck with a code/design problem, a public Github repository OR perhaps better a Gist gist.github.com can make sharing a lot easier.
I don't understand why you are thinking about carving. That HDD Guru thread points to a Python script which appears to actually parse the file system.
http://leho.kraav.com/blog/2009/02/25/creative-zen-vision-m-rescue-operation/
To the OP, be aware that code written for older Python versions may not run on recent versions.
Code, I wrote it late at night so I didn't really think much about it. The biggest annoyance for me is that I had to write similar lines of code 8 times, for every obstacle on the screen, can I write collision detectors or just functions that update the postition of obstacles without having to write basically the same code 8 times?
That doesn’t sound right. Why do you need to access fields directly outside of the class implementation? Polymorphism should take care of dispatching to the right impl even if your variable is referenced as a more general class. That’s the point.
Do you have example code where you seem to need to cast? Something smells off with what you’re describing and there’s likely something else going on. Toss it up on a paste site like [gist](http.//gist.github.com) and let us take a look.
I know that the majority of the research I read suggests it's not a particularly fruitful field, but just take a look at a dataset for you and see if you disagree with the general conclusion.
The reason for this is that there are quite a few different types of data and they are just going to have different degrees of abstraction, and the idea of a single 'data' is something that you can't really apply in practice. I'd also recommend looking at how a dataset is constructed.
There are, of course, a few other kinds of data that you can build.
I'll assume you're on Windows 10. Install this script and try. If it fixes the stutters it was the stand-by memory problem, if not, report back and we'll try another thing.
you can use the http://gist.github.com to share single files with users , its also great for keeping your .vimrc
and .*rc
files.
All you need is the id of the gist (even though the url is like
gist.github.com/<user:str>/<id:str>
you can just use gist.github.com/<id:str>
to get to the file.
Or instead of all that: install this script and play. If it fixes the stutters it was the stand-by memory problem.
Of course always update all your device drivers every 1-3 months.
OK, this post is amazing.
You appear to have taken a cell-phone picture of your monitor, containing a C# program that you need help with.
This subreddit is for the C programming language. Try /r/csharp, or /r/CSharpHomework.
If/when you post there, upload the text of your program to something like GitHub Gists, or Pastebin instead of posting a picture. With a picture you force people to retype your whole program.
Good luck!
ok, try the following,
run
ghc --print-libdir
This will spit out a path, like mine gives E:\ghc-dev\msys64\mingw64\lib
.
Create a file test.hs
with this content
import GHC
import DynFlags
import Linker
import GhcMonad
import GHCi.ObjLink
main =
defaultErrorHandler defaultFatalMessager defaultFlushOut $ do
runGhc (Just "E:\\ghc-dev\\msys64\\mingw64\\lib") $ do
_ <- getSessionDynFlags
session <- getSession
liftIO $ do initDynLinker session
lookupSymbol "sem_wait"
Replace the path in runGhc
with the one you got earlier, Notice that any \
has to be escaped to \\
.
compile that by doing
ghc -debug -package ghc Test.hs
Run the produced file with
Test.exe +RTS -Dl 2> dump.log
and put the content of dump.log
somewhere like a pastebin or http://gist.github.com/.
now in msys2 run
strace ./Test.exe | grep winpthread
which should give you something like
--- Process 31684 loaded E:\ghc-dev\msys64\mingw64\mingw\bin\libwinpthread-1.dll at 0000000064940000
--- Process 18360 loaded E:\ghc-dev\msys64\mingw64\mingw\bin\libwinpthread-1.dll at 0000000064940000
paste that here. If strace still doesn't work, then use something like http://www.rohitab.com/download/api-monitor-v2r13-setup-x64.exe
click the "monitor new process", open the test.exe
we made and press ok.
Afterwards go to File -> Save As and save the trace. upload the file somewhere and PM me a link.
I'll PM you and u/MaxIsTheDog4u as I don't want to run afoul of the academic honesty policy for CS50 and I am at work and don't have the time to figure out http://gist.github.com right now.
Next time, put your code on a paste sharing website like GitHub Gist or Pastebin
Anyway, I think you'll find that your problem lies on this line.
> if(letter == "N")
Double quotation marks("
) denotes a string literal, which will get compiled to a pointer. If you want a character literal, use single quotes('
).
Please, post your entire code on <em>github gist</em>.
You can just drag all classes over onto the gist window so that all files (classes) appear in a single gist. Then, post the link here in an edit.
Honestly, if you read through the syntax of the code, MPMB walks you through step-by-step what each thing does. He has a comment on every line for if it is required or optional, and what it does, and how it works.
Check out the code for adding a race, for example. For each line, there is a comment. For size, he says what each number means. For tools, he explains the array of arrays, what it means, and what each part means. For Languages, he says how to allow players to select any language when they choose the race.
While I understand wanting a video, I think it would be redundant, because it would basically just be someone reading the comments of the syntax out loud.
The best way to learn this is just by trying and failing, fixing and trying again until it works. Trust me, I was feeling lost when I started too. But by closely following the comments that MPMB provides in the example syntax, using a site like JSHint to check for issues in your code, and posting here to get feedback when I feel completely lost, I was able to get better to where I feel I can code up things with confidence. I always just copy and paste the example syntax, and then fill in what I need.
I am definitely down to help you creating your first race. If you have questions, please feel free to reach out to me with what you've done, and I will be more than happy to offer guidance as you work through.
Happy coding!
____________
My GitHub Repo for MPMB: http://gist.github.com/AelarTheElfRogue/
Your code didn't paste correctly you need 4 spaces before each line - alternatively you can host it on a paste service such as http://gist.github.com
As for your code does print(titles[0])
produce the data you want to save?
You can use a csv.writer object from the csv module to build a csv file.
Works perfectly for me: https://i.imgur.com/qbtlIBo.png
You might have styles that conflict with this, by affecting the elements such as .browserContainer
and findbar
. A gist of your userChrome.css
would be helpful.
Hmm... you seem to not be getting the transitions either 🤔
Are you sure you've added it to the userChrome.css
file of the profile that is in use? A gist of that file would be helpful...
So take the data, parse it, make it a json, upload it to http://gist.github.com & then use it as an API. I did something like this a long ago