Posts

ios - Remove unused resources from XCode project -

i working on ios application , in application have big changes in app design every day code of application going touch 200 mb. in code have big numbers of unused images available. want remove images xcode project can reduce project code size. i had used scripts thats given on stackoverflow.com found script removing used images thats not reliable. had used app named "slender". trial version cant use more. so please 1 suggest me effective way (any application) remove unused images xcode project. unused find unused resources in xcode project https://github.com/jeffhodnett/unused

how free text search works in postgresql -

i working on project in have implement free text using postgresql database, not able understand how can work using @@ instead of command. i have table employee - id - name - location - managername //my query select * employee name @@ 'xxx' i searching on name free text , gives result, can nay 1 tell me index or search catalogue, didn't made , configuration etc still working. any chance postgresql tables or created catalogue on runtime? can 1 tell me how works? what's happening if @ operators defined @@ you'll see there few variants different data types. they're overloads same operator. regress=> \do @@ list of operators schema | name | left arg type | right arg type | result type | description ------------+------+---------------+----------------+-------------+------------------------------ pg_catalog | @@ | text | text | boolean | text sea...

sql - Updating NULL Field vs Most Recent Record -

i have table contains null field. needs populated table. while statement getting information other table simple concerned performance of update. the update done script scheduled run every 30 minutes. which better: update using field null statement update table1 set freefield=(select name table2 table1.keyfield=table2.field) freefield null; update using statement updates last x records update table1 set freefield=(select name table2 table1.keyfield=table2.field) rowid in ( select rowid ( select keyfield table1 order keyfield desc ) rownum < 300 ); table1.keyfield , table2.field indexed , have primary/fk relation. table1.freefield , table2.name not indexed , text fields. currently table 100k record grow massively. i'm asking going take longer search null fields in table or order , use recent number specified. the final plan implement trigger records updated @ creation cannot implemented until next release of...

c++ - Why do I have to access template base class members through the this pointer? -

if classes below not templates have x in derived class. however, code below, have to use this->x . why? template <typename t> class base { protected: int x; }; template <typename t> class derived : public base<t> { public: int f() { return this->x; } }; int main() { derived<int> d; d.f(); return 0; } short answer: in order make x dependent name, lookup deferred until template parameter known. long answer: when compiler sees template, supposed perform checks immediately, without seeing template parameter. others deferred until parameter known. it's called two-phase compilation, , msvc doesn't it's required standard , implemented other major compilers. if like, compiler must compile template sees (to kind of internal parse tree representation), , defer compiling instantiation until later. the checks performed on template itself, rather on particular instantiations of it, require compiler able resolve...

javascript - Mime type for archive -

i trying upload archive file taken through <input type=file> in html, calling servlet using javascript. in javascript trying mime type of it, giving type ""(means empty). how can identify whether archive? looks there isn't 1 mime type archives, each have own (if have 1 @ all). have this wikipedia article more info.

c++ - Boost property tree: Remove a nested node -

suppose have following tree: boost::property_tree::ptree tree; tree.add("1.2.3", "value-1"); tree.add("1.2.3.4", "nested-value"); tree.add("1.2.3", "value-2"); tree.add("1.2.33", "other-value"); which has following serialized info form: 1 { 2 { 3 value-1 { 4 nested-value } 3 value-2 33 other-value } } is there method remove nodes having provided (possibly nested) path? i.e.: remove(tree, "1.2.3"); boost_assert(!tree.get_optional<std::string>("1.2.3") && !tree.get_child_optional("1.2.3")); with result info form: 1 { 2 { 33 other-value } } looking @ ptree docs , source code i've found several methods remove immediate children of tree (nested children not accounted). also, there several methods subtree it's full path (even if nested). since th...

Get image name from database in laravel -

i have database, columns image , alttag. want use them in laravel blade view. try this: {{ html::image('images/{{ $item->image }}', $alt="{{ $item->alttag }}") }} but syntax isn't correct. if echo image , alttag this: <h1>{{ $item->alttag }}</h1> then correct. wonder wrong in code. you used blade syntax in php string. watch compiled blade templates see did go wrong. in short. try this: {{ html::image('images/'. $item->image, $alt = $item->alttag) }} or equally short: {{ html::image("images/{$item->image}", $alt = $item->alttag) }}