Posts

c++ - Compiling with clang with c++11 enabled fails -

having following test.cpp : #include <iostream> int main() { int a{}; std::cout << "test" << std::endl; } when build latest gcc (4.8.0) g++ test.cpp -std=c++11 (gcc fails), file compiles. trying compile latest clang clang version 3.4 (trunk 182322) target: x86_64-apple-darwin12.3.0 thread model: posix the build fails: clang test.cpp -std=c++11 undefined symbols architecture x86_64: "std::ostream::operator<<(std::ostream& (*)(std::ostream&))", referenced from: _main in test-ncubkf.o "std::ios_base::init::init()", referenced from: ___cxx_global_var_init in test-ncubkf.o "std::ios_base::init::~init()", referenced from: ___cxx_global_var_init in test-ncubkf.o "std::cout", referenced from: _main in test-ncubkf.o "std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::bas...

SQL Server : stored procedure not returning the correct results -

i have created stored procedure deletes list of usernames database. output of script weird. treats input username input column. why doing ? create procedure [dbo].[sp_deleteusersfromdb]( @username varchar(500)) begin declare @sql varchar(600) exec('update [dbo].user set deleted = 1 username in (' + @username + ')') print n'deleted users db' end when run msg 207, level 16, state 1, line 1 invalid column name 'user1'. deleted users database table schema : create table [dbo].[user]( [id] [int] identity(1,1) not null, [version] [int] not null, [username] [varchar](32) not null, [deleted] [bit] null, constraint [user_pk] primary key clustered ([id] asc) ) on [primary] the @username parameter must contain quoted usernames, eg "'user1', 'user2'"

Find the difference between two dates using PHP? -

this question has answer here: how calculate difference between 2 dates using php? 29 answers i have 2 dates of form: start date: 2013-05-19 end date: 2013-05-21 now need find difference between these 2 in following form: 2013-05-20 2013-05-21 how can in php? this should converting iso unix: http://www.laughing-buddha.net/php/dates most efficient way convert iso date unix timestamp? you subtract 1 date other, divide 3600 , end difference in days, if understood question properly

Git merge failed to bring over some files -

i did large merge develop master , git handled correctly. there 3 files existed in both branches prior merge git recognized old ones in master, marked added us . expected instead conflict resolve, because wanted changes exist in develop . thing let me resolve either add them (meaning i'd keeping old master version or remove them. choose latter , attempted merge, says i'm up-to-date. files exist in develop not in master , git seems have no clue this. why won't git let me bring these files on , can resolve this? so there 3 files in develop want in master . try this git checkout master # make sure on master branch git checkout develop -- name_of_file_1.ext name_of_file_2.ext name_of_file_3.ext this should bring on 3 files want develop in recent state.

Is it possible to run uipv6 without contiki? -

as known, uipv6 integrated contiki-os. so, possible separate uipv6 contiki-os? can run uipv6 in platform without os. i have googled long time. however, there no information issue. contiki-os modular. if want use uip-ipv6 stack.yes, can. have @ following link: http://contiki.sourceforge.net/docs/2.6/a01790.html uip-ipv6 specific features.

visual studio - Unresolved External - DirectX11 -

1>------ build started: project: setup, configuration: debug win32 ------ 1>effects11d.lib(effectapi.obj) : error lnk2019: unresolved external symbol _d3dcompilefromfile@36 referenced in function _d3dx11compileeffectfromfile 1>c:\users\josh\documents\game institute\directx\chapter 1\projects\setup\debug\setup.exe : fatal error lnk1120: 1 unresolved externals ========== build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== i've been trying setup directx11 visual studio 2012 on windows 7 , following frank lunas instructions in directx11 book awhile , keep running errors. currently error, have 'd3dcompiler.lib' , i've updated effects library, here picture of debug mode properties: http://tinypic.com/view.php?pic=jb64vc&s=5 release mode properties same 'd' removed on 2 library files. 'effects11d' example. please me! it's driving me crazy! you don't need use legacy directx sdk unless using d3dx11 (which d...

How do supertype generics in Java work? -

i've been testing supertype generics java, i've come roadblock. sample code testing: import java.util.*; class generictests { public static void main( string[] args ) { list<b> list3 = new arraylist<b>(); testmethod( list3 ); } public static void testmethod( list<? super b> list ) { list.add( new a() ); list.add( new b() ); } } class { } class b extends { } when compiled, error is: generictests.java:20: error: no suitable method found add(a) list.add( new a() ); ^ method list.add(int,cap#1) not applicable (actual , formal argument lists differ in length) method list.add(cap#1) not applicable (actual argument cannot converted cap#1 method invocation conve rsion) cap#1 fresh type-variable: cap#1 extends object super: b capture of ? super b 1 error i thought given lower bound of b, add supertype? or apply references (i.e. arguments within method signature) becaus...