Posts

iphone - find out users who deleted my app -

i've created iphone app , it's on app store, know number of downloads , wondering if there way find out how many users removed/deleted app phone i'm afraid can't this. apple doesn't provide information. provide update app , see how many people updated app. won't show has app on devices, give idea of how many people conscious app enough update it.

sql server - MSSQL error #120 -

i have following sql: insert [dbo].[table1] ([col1],[col2],[col3],...[col14]) select * [dbo].table2 go running throws mssql err #120 means number of columns line insert. table2 has 5 columns , table1 has 14. correct in assuming cause of error? reason ask a) not familiar mssql , b) unfamiliar database. yes, cause of error. you have to: insert [dbo].[table1] ([col1],[col2],[col3],...[col14]) select col1, col2, col3, col4, col5, --your table's columns 'const1', null, 1, etc... --other values want other columns, [dbo].table2 --defaults, constants, null, etc. go or insert [dbo].[table1] ([col1],[col2],[col3],[col4],[col5]) --the rest have default value. select col1, col2, col3, col4, col5 [dbo].table2 go

linux - sed usage in x loader Makefile -

what sed command do? when run uname -m on pc, returns x86_64 . hostarch := $(shell uname -m | \ sed -e s/i.86/i386/ \ -e s/sun4u/sparc64/ \ -e s/arm.*/arm/ \ -e s/sa110/arm/ \ -e s/powerpc/ppc/ \ -e s/macppc/ppc/) note: code snippet x loader makefile. the sed tries show system run more readable name. eks if have i.86 shows i386 but 1 made script did forget intel 64 bits x86_64 .

sql server - condition based select SQL query -

for example have table "info" below. +--------+------------+------+------------+ | entity | department | code | code_count | +--------+------------+------+------------+ | e1 | d1 | 123 | 5 | | e1 | d1 | 234 | 10 | | e1 | d1 | 345 | 20 | | e1 | d2 | 456 | 2 | | e1 | d2 | 567 | 5 | | e1 | d2 | 678 | 10 | +--------+------------+------+------------+ my query should function this: each entity , department pair, select code has maximum code count . any appreciated. thanks. select t1.* your_table t1 join ( select entity, department, max(code_count) code_count your_table group entity, department ) t2 on t1.entity = t2.entity , t1.department = t2.department , t1.code_count = t2.code_count

c++ - Converting printf-style logger with stack buffer to stringstream -

i have logging solution defines macro this: #define my_log(level, component, message, ...) { mylog::instance()->log(level, component, message, __file__, __line__, ##__va_args__); } the const char* message parameter using printf format, " my name %s , %u. " the actual logging method using declaring char buffer[2048] variable on stack , using vsnprintf convert va_list param, defined in message parameter, buffer. however, handling values can quite bigger 2k, buffer truncated thought reworking whole thing around stringstream more flexible. when implementing solution, encountered problem retrieving va_args parameters list use << operator... solution available parse whole message parameter % values , retrieve them using va_arg type retrieved? need push text between % values, vsnprintf handy, need split strings on % push previous text stringstream... hint or idea me out issue? i can't use external libs , support platforms , compilers may or may not suppor...

algorithm - Constructing a polygon (hexagon) given length of one side, 2 points and the perimeter? -

i have general question on algorithm use construct irregular polygon. i have following scenario: have start , end position ship, know distance between 2 position (say 40km). using info, calculate remaining vertices of polygon includes 1 side, while other sides should equal in length , sum 200km (as matter of fact, user supplied length). therefore know perimeter of resulting polygon , 2 vertices make 1 of sides. in short, how other 4 vertices each side besides calculated same size (and perimeter of hexagon adds 200 + initial side)? thanks in advance!

c++ - How do you dynamically expand array and update? -

i trying wrap head around how logic works. idea dynamically allocate memory because won't know how many iterations program go through , can't use vectors. here abstraction of have far. have while loop contains variable count act size of array. update stored in array. thing can't figure out how update array ipoint without making infinite amount of if else statements. know there better way @ point brain fried. #include <iostream> #include <string> using namespace std; int main() { int itickets, count = 0, update = 0; int *tempipoint = null; int *ipoint = null; { count++; update++; if (count == 1) { tempipoint = new int[count]; (int = 0; < count; i++) { *(tempipoint + i) = update; } } else if (count > 1) { ipoint = new int[count]; (int = 0; < count; i++) ...