|
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. |
If you just need a serializer you can just construct a new Gson, there is no reason to use the builder.
With that being said the Gson Builder is a fluent builder, which in my opinion is way nicer to use than if you were to have to pass in a builder to gson
You can do things like Gson g = new GsonBuilder().setPrettyPrint().register(...).create();
more documentation
|
On January 21 2014 05:15 Tobberoth wrote:Damnit, the HSM-2 is just brutal on microcorruption.com. I'm at a point where I can direct the code where I want, even add a bit of assembly myself, but since I don't know the password and can't unlock the door from the code, I can't imagine how to proceed, other than sending random passwords to the lock which is obviously not an option. I didn't even realize that's what the HSM-2 did at first, was quite disappointing to crack it enough to get "Access granted", yet no door opening ^^ EDIT: And there I solved it. I'm kind of surprised + Show Spoiler +that interrupt 7f completely bypasses the password. . I just made it through the first non-tutorial level. (New Orleans) In hindsight, it was really easy, but getting there took me about half an hour of staring at assembly instructions and stepping around with the debugger. It's a lot of fun though.
|
|
|
Oh that's pretty cool.
Has anyone had any experience with leveldb? https://code.google.com/p/leveldb/
I have to use it for a course and my TA is saying that I have to "install" it? I can make leveldb just fine with the default make file but I'm supposed to use a specific make file and two other files.
CC = g++ OPTS = -I $(LEVELDB_DIR)/include -lpthread $(LEVELDB_DIR)/libleveldb.a
all: read write read: read.cc $(CC) -o read read.cc $(OPTS)
write: write.cc $(CC) -o write write.cc $(OPTS)
clean: rm -rf read write leveldb_dir
test: all ./write ./read
I have read.cc and write.cc in the same folder as the makefile. Every time I run make, I get an error message:
g++ -o read read.cc -I /include -lpthread /libleveldb.a g++: error: /libleveldb.a: No such file or directory make: *** [read] Error 1
wut do?
nvm I'm getting it slowly.
|
This is a homework/assignment question for one of my courses:
In the current directory, show how to mark all untracked files/folders to be added to svn on the next svn commit command.
How would you do this in one line? I simply cannot see a way to do this and no one I have asked at my school knows how to do it either. If anyone could even just point me to the right command and let me go from there I'd appreciate that.
|
On January 24 2014 09:02 WarSame wrote: This is a homework/assignment question for one of my courses:
In the current directory, show how to mark all untracked files/folders to be added to svn on the next svn commit command.
How would you do this in one line? I simply cannot see a way to do this and no one I have asked at my school knows how to do it either. If anyone could even just point me to the right command and let me go from there I'd appreciate that. Does "svn status" work?
I know "git status" will show all untracked files to be added if you use "git add ."
|
|
|
Well as far as I have read up on, svn status * would just tell me that status of each file in the current directory. From the question I think the goal is to add all nontracked(which I think means ones that aren't included in the repository yet) to the commit-queue so that they will be commited on the next commit. It's possible that it is svn status *, but that doesn't really seem to do anything other than just list the status of each file, so it doesn't seem to accomplish what they want.
|
On January 24 2014 09:14 Blisse wrote: "svn add *" should work. Yes, Blisse I think this is it. I feel very stupid overlooking this command haha. Thanks!
|
On January 24 2014 09:15 WarSame wrote: Well as far as I have read up on, svn status * would just tell me that status of each file in the current directory. From the question I think the goal is to add all nontracked(which I think means ones that aren't included in the repository yet) to the commit-queue so that they will be commited on the next commit. It's possible that it is svn status *, but that doesn't really seem to do anything other than just list the status of each file, so it doesn't seem to accomplish what they want. Ah I misread the question.
|
Yeah I misunderstood what the question was on about as well.
|
working on some project at univ, need to configure some hardware device. planning on using boost::mpl to allow for easy configuration of ranges of ports with various attributes.
wanted to specialize a class template on a boost::mpl::vector_c<unsigned int,port0,port1,...,portn> where port# is an unsigned int to use in said configuration...
#include<boost/mpl/vector_c.hpp> #include<iostream>
template<class vector_t> struct team;
template<unsigned int... I> struct team<boost::mpl::vector_c<unsigned int,I...>>{ static void liquid(){ std::cout<<".net"; } };
int main(){ team<boost::mpl::vector_c<unsigned int,1,2,3>>::liquid(); } however when compiling, the instantiation resolved to the class template shape definition instead of the specialization. the honorable gcc declared unto me:
test.cpp: In function ‘int main()’: test.cpp:12:2: error: incomplete type ‘team<boost::mpl::vector_c<unsigned int, 1l, 2l, 3l> >’ used in nested name specifier team<boost::mpl::vector_c<unsigned int,1,2,3>>::liquid();
the devil is in the details of course and assumption is the mother off all fuckups. the resulting type of the value parameters in boost::mpl::unsigned_c<unsigned int,1,2,3> was not unsigned int at all, but long as you can readily read in the error message.
i did not read the error message readily enough and was left in a state of disarray until just now when i was formulating this post to ask for your help.
saw this link on slashdot a while ago, found it entertaining:
king james programming
Posts generated by a Markov chain trained on the King James Bible and Structure and Interpretation of Computer Programs. Run by Michael Walker (barrucadu).
|
|
|
i don't understand your quesiton.
|
Hyrule19167 Posts
On January 24 2014 11:27 mishimaBeef wrote: why no HDL section? because VHDL is the devil
|
On January 24 2014 11:01 nunez wrote:working on some project at univ, need to configure some hardware device. planning on using boost::mpl to allow for easy configuration of ranges of ports with various attributes. wanted to specialize a class template on a boost::mpl::vector_c<unsigned int,port0,port1,...,portn> where port# is an unsigned int to use in said configuration... #include<boost/mpl/vector_c.hpp> #include<iostream>
template<class vector_t> struct team;
template<unsigned int... I> struct team<boost::mpl::vector_c<unsigned int,I...>>{ static void liquid(){ std::cout<<".net"; } };
int main(){ team<boost::mpl::vector_c<unsigned int,1,2,3>>::liquid(); } however when compiling, the instantiation resolved to the class template shape definition instead of the specialization. the honorable gcc declared unto me: test.cpp: In function ‘int main()’: test.cpp:12:2: error: incomplete type ‘team<boost::mpl::vector_c<unsigned int, 1l, 2l, 3l> >’ used in nested name specifier team<boost::mpl::vector_c<unsigned int,1,2,3>>::liquid();
the devil is in the details of course and assumption is the mother off all fuckups. the resulting type of the value parameters in boost::mpl::unsigned_c<unsigned int,1,2,3> was not unsigned int at all, but long as you can readily read in the error message. i did not read the error message readily enough and was left in a state of disarray until just now when i was formulating this post to ask for your help. saw this link on slashdot a while ago, found it entertaining: king james programmingShow nested quote +Posts generated by a Markov chain trained on the King James Bible and Structure and Interpretation of Computer Programs. Run by Michael Walker (barrucadu). It's funny how often I've started writing a forum post about some programming problem I had and during the writing of the post, I realized what was wrong and discarded the post. It's the same when I write something to a friend about a programming problem. I tell him and read through my messages once or twice while he's thinking about it and I suddenly find the error.
|
aha, yes! figured i might as well post it.
btw thx sluggaslammo, i switched to a tiling windows manager (i3), and it's really nice!
|
On January 24 2014 22:44 klo8 wrote:Show nested quote +On January 24 2014 11:01 nunez wrote:working on some project at univ, need to configure some hardware device. planning on using boost::mpl to allow for easy configuration of ranges of ports with various attributes. wanted to specialize a class template on a boost::mpl::vector_c<unsigned int,port0,port1,...,portn> where port# is an unsigned int to use in said configuration... #include<boost/mpl/vector_c.hpp> #include<iostream>
template<class vector_t> struct team;
template<unsigned int... I> struct team<boost::mpl::vector_c<unsigned int,I...>>{ static void liquid(){ std::cout<<".net"; } };
int main(){ team<boost::mpl::vector_c<unsigned int,1,2,3>>::liquid(); } however when compiling, the instantiation resolved to the class template shape definition instead of the specialization. the honorable gcc declared unto me: test.cpp: In function ‘int main()’: test.cpp:12:2: error: incomplete type ‘team<boost::mpl::vector_c<unsigned int, 1l, 2l, 3l> >’ used in nested name specifier team<boost::mpl::vector_c<unsigned int,1,2,3>>::liquid();
the devil is in the details of course and assumption is the mother off all fuckups. the resulting type of the value parameters in boost::mpl::unsigned_c<unsigned int,1,2,3> was not unsigned int at all, but long as you can readily read in the error message. i did not read the error message readily enough and was left in a state of disarray until just now when i was formulating this post to ask for your help. saw this link on slashdot a while ago, found it entertaining: king james programmingPosts generated by a Markov chain trained on the King James Bible and Structure and Interpretation of Computer Programs. Run by Michael Walker (barrucadu). It's funny how often I've started writing a forum post about some programming problem I had and during the writing of the post, I realized what was wrong and discarded the post. It's the same when I write something to a friend about a programming problem. I tell him and read through my messages once or twice while he's thinking about it and I suddenly find the error.
Happens a lot. I think it has to do with the fact that when you explain a problem to someone, a part of you tries to see it from their perspective, thereby dissolving the preconceptions/assumptions you had about the problem, and allowing you to see more clearly and/or creatively.
|
|
|
That always happens to me when I am asking a professor a question about an assignment. I usually let them answer anyway just to make sure I was right.
That actually happened with an induction proof the other day. I was discussing it with a coworker, and in the process figured out how to finish the proof.
I'mma get a rubber duck. That's a great idea.
Nondeterministic Finite Automata!
|
|
|
|
|
|