Go to advanced search

by lilzz
Mon Nov 16, 2015 4:26 am
Forum: C/C++
Topic: std::less<T> and push_heap versus push_back
Replies: 6
Views: 939

Re: std::less<T> and push_heap versus push_back

@andyD, why's push_heap always called? The V.size never equal to n?
by lilzz
Mon Nov 16, 2015 1:14 am
Forum: C/C++
Topic: std::less<T> and push_heap versus push_back
Replies: 6
Views: 939

Re: std::less<T> and push_heap versus push_back

what's your point?
Are you telling me you know the answer above because you have a book?

yeah right!

How about just answer one question above just prove you already know the answer?
by lilzz
Mon Nov 16, 2015 12:24 am
Forum: C/C++
Topic: std::less<T> and push_heap versus push_back
Replies: 6
Views: 939

std::less<T> and push_heap versus push_back

std::less<T> with less defined as structure. template <class _Tp> struct less : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; } }; 1) what's the difference between _ and __ from above?(_Tp , __x) what does it means to the compiler?...
by lilzz
Sun Nov 15, 2015 5:33 am
Forum: C/C++
Topic: A vector of bunch of constant 1's
Replies: 6
Views: 934

Re: A vector of bunch of constant 1's

@andyD , your explanation is very cool. Thx
by lilzz
Sun Nov 15, 2015 2:30 am
Forum: C/C++
Topic: A vector of bunch of constant 1's
Replies: 6
Views: 934

Re: A vector of bunch of constant 1's

#ifndef PNR_BITVECTOR_HH #define PNR_BITVECTOR_HH #include <vector> #include <cstddef> #include <cstdint> #include <cassert> template<size_t B> class BasedBitVector { int n; std::vector<uint64_t> v; public: class BitRef { std::vector<uint64_t> &v; size_t i; public: BitRef (std::vector<uint64_t> &v_...
by lilzz
Sun Nov 15, 2015 1:21 am
Forum: C/C++
Topic: A vector of bunch of constant 1's
Replies: 6
Views: 934

A vector of bunch of constant 1's

1)BasedBitVector<1> locked;

what's the use of this one? what purpose?

2) BasedVector<int, 1> gate
why two types inside <>? it's a vector of int and constant 1's?

3) std::vector<std::vector<int>> related_tiles;

is that of 2D array of ints?
by lilzz
Fri Oct 30, 2015 12:37 am
Forum: Python
Topic: The following regular expression
Replies: 3
Views: 668

The following regular expression

1) match = re.match(r"B(\d+)\[(\d+)\]$", bit)

what does "B(\d+)\[(\d+)\]$" means?

2) match = re.match(r"(.*?_)(\d+)(.*)", s[2])

"(.*?_)(\d+)(.*)"?
by lilzz
Wed Sep 30, 2015 5:57 am
Forum: C/C++
Topic: const char *const *Args,
Replies: 4
Views: 1191

const char *const *Args,

const char *const *Args,

what is this? Args is pointer to what? why there's 2 *there?
by lilzz
Fri Sep 04, 2015 10:08 pm
Forum: C/C++
Topic: the purpose of ** besides 2-d array?
Replies: 16
Views: 1891

Re: the purpose of ** besides 2-d array?

I don't see the advantage of using boolean ** versus boolean is it because of itchy fingers?? To be honest if you don't see the advantage then you don't understand the difference. It seems you really don't understand C and are trying a project that is much to advanced for you. Go and find a good C ...
by lilzz
Fri Sep 04, 2015 5:39 pm
Forum: C/C++
Topic: the purpose of ** besides 2-d array?
Replies: 16
Views: 1891

Re: the purpose of ** besides 2-d array?

I don't see the advantage of using boolean ** versus boolean

is it because of itchy fingers??
by lilzz
Thu Sep 03, 2015 9:19 pm
Forum: C/C++
Topic: the purpose of ** besides 2-d array?
Replies: 16
Views: 1891

Re: the purpose of ** besides 2-d array?

PeterO wrote:It's the same as it was the last time you asked the same question !

viewtopic.php?f=33&t=117850&p=801225#p801225

PeterO

yeah, but the answer I got is related 2 -d array. what about Boolean ** ? you know?
by lilzz
Thu Sep 03, 2015 9:10 pm
Forum: C/C++
Topic: the purpose of ** besides 2-d array?
Replies: 16
Views: 1891

Re: the purpose of ** besides 2-d array?

Joe Schmoe wrote:Reading a basic C book would probably help.
or general search around the google too for that matter. I guess eventually the answers would be there, someday.
by lilzz
Thu Sep 03, 2015 9:07 pm
Forum: Graphics programming
Topic: What's a good GUI framwork for Linux and Window?
Replies: 12
Views: 5680

What's a good GUI framwork for Linux and Window?

I like to create an application and need a good framework that work in Linux and Window.
I also have alot of C codes too that needed to be integrated. So, the frame work need to interface well with C codes or even Java codes.
by lilzz
Thu Sep 03, 2015 8:21 pm
Forum: C/C++
Topic: the purpose of ** besides 2-d array?
Replies: 16
Views: 1891

the purpose of ** besides 2-d array?

1) float **delta_clb_to_clb; delta_clb_to_clb[id_x][id_y]; case 1 is obvious,delt_clb_to_clb is declared with 2 level of pointers ** because it's for a 2-d array. 2) struct s_block {char *name; enum e_block_types type; int *nets; int x; int y;}; block = (struct s_block *) my_malloc (num_blocks* size...
by lilzz
Wed Sep 02, 2015 6:24 pm
Forum: Java
Topic: How do you use Hashmap, Hashset, ArrayList , [ ]
Replies: 2
Views: 680

How do you use Hashmap, Hashset, ArrayList , [ ]

what's the difference between Hashmap and Hashset?

The difference betwen ArrayList versus Arrayname [ ]
by lilzz
Fri Jul 31, 2015 11:14 pm
Forum: Python
Topic: How does the following codes do
Replies: 1
Views: 405

How does the following codes do

for x in range(1, self.max_x): for y in range(1, self.max_y): if x in (3, 10): if y % 2 == 1: self.b_tiles[(x, y)] = ["0" * 42 for i in range(16)] else: self.t_tiles[(x, y)] = ["0" * 42 for i in range(16)] else: self.l_tiles[(x, y)] = ["0" * 54 for i in range(16)] 1)What's "0"*42 for i in range(16)...
by lilzz
Tue Feb 24, 2015 7:58 pm
Forum: General discussion
Topic: Pi controlled Laser system.
Replies: 2
Views: 522

Pi controlled Laser system.

http://s1298.photobucket.com/user/Irene_Cassandra/media/setup2_zpsf3bbb25a.png.html 1)Can I duplicate this setup for $60 USD? 2)laser induced spectroscopy, is that using green visible laser at 532nm? 3)What if sample is liquid in glass bottle? would that glass interfere with laser and liquid sample...
by lilzz
Fri Feb 13, 2015 12:57 am
Forum: General discussion
Topic: logic pi any good?
Replies: 1
Views: 340

logic pi any good?

Someone make fpga board for pi but I see they use SPI interface.that's too slow. Fpga usually have bursts of data coming through. SPI is not good for that. Any other options?
by lilzz
Thu Feb 12, 2015 6:59 pm
Forum: General discussion
Topic: what happened to latest Raspbian
Replies: 1
Views: 502

what happened to latest Raspbian

no more /etc/modprobe.d/raspi-blacklist.conf file. I don't see it,

moprobe spi_bcm2708, it said No such device.

what happened?
by lilzz
Thu Feb 12, 2015 1:38 am
Forum: General discussion
Topic: how to implement software RAID
Replies: 7
Views: 999

Re: how to implement software RAID

Raid only protects against storage failure, it does not inherently protect against storage being corrupted by improper shutdown. Got corrupted sd card few times, how to implement a raid so it can self correcting therefore no need for me to 're image I think it should work. Raid has a mirror section...
by lilzz
Thu Feb 12, 2015 12:50 am
Forum: General discussion
Topic: how to implement software RAID
Replies: 7
Views: 999

how to implement software RAID

Got corrupted sd card few times, how to implement a raid so it can self correcting therefore no need for me to 're image
by lilzz
Wed Feb 11, 2015 1:07 am
Forum: General discussion
Topic: is flash nand chip more reliable than sdcard
Replies: 7
Views: 3201

is flash nand chip more reliable than sdcard

I heard people's OS image got corrupted on sdcard. Is Nand chip more robust. I never heard BIOS being corrupted on Nand flash chip.
by lilzz
Wed Feb 04, 2015 8:28 am
Forum: General discussion
Topic: model A+ dimension and holes position
Replies: 4
Views: 1433

Re: model A+ dimension and holes position

simplesi wrote:To what degree of accuracy do you need?

Simon
mm or inch. regular mechanic drawing.
by lilzz
Wed Feb 04, 2015 6:46 am
Forum: General discussion
Topic: model A+ dimension and holes position
Replies: 4
Views: 1433

model A+ dimension and holes position

I would like have the mechanic drawing of model A+ showing the board size and hole positions.
by lilzz
Sat Jan 17, 2015 7:54 pm
Forum: General discussion
Topic: what's the usage of /etc/apt/sources.conf?
Replies: 1
Views: 361

what's the usage of /etc/apt/sources.conf?

Is it related sudo apt-install issues?

what kind of parameters we have to watch out for?

Go to advanced search