Hi All, I wanted to know in below code snippet what will be impact if m_singleObject is declared as a weak_ptr. Usaually we peform lock on weak_ptr and convert the same in to the shared pointer and then return the same to GetInstance() function. static std::shared_ptr<singleType> shareObject = m_singleObject.lock why can't we use direcltly shared_ptr for m_singleObject instead of by declaring weak_ptr and peforming the lock on the same as i did in below code snippet. #include <iostream> #include <memory> using namespace std; class a { public: void fun(){cout<<"show";} }; template<class singleType> class Singleton { public: static std::shared_ptr<singleType> GetInstance(); private: …

Member Avatar
Member Avatar
+0 forum 2

I have been using a D-Link DSL-2730U modem for over a year now. This modem served a desktop PC (connected directly from the modem to PC's LAN card), a laptop, and three smart phones (by wi-fi). None of us had any problem in accessing the internet from the PC/laptop/smart phones. About 10 days ago, one of the mobile phones (Sony Ericsson minipro) stopped getting the wi-fi connectivity from this modem, though the others continue to get the wireless or the wired connectivity. This mobile phone picks wi-fi connection from modems belonging to my friends when I visit them and am …

Member Avatar
Member Avatar
+0 forum 8

Challenge: change the code so that only .py and .txt files of a given directory are listed. ''' filename_list_given_dir1.py use module glob to list all the filenames of .jpg files or any extension(s) you specify in a given directory ''' import glob import os # all files (split off file names) in a given directory directory = "C:/Temp/*.jpg" # this would give you all files #directory = "C:/Temp/*.*" for path in glob.glob(directory): #print(path) # test # separate path from filename dirname, filename = os.path.split(path) print(filename)

Member Avatar
Member Avatar
+0 forum 14

Dear Kind-Coders, I am trying to learn to use boost::shared_ptr to manage the lifetime of a DLL, but I am having a type conversion problem whilst setting it up. Please see the following code: #include <boost/make_shared.hpp> int main() { { class CMyClass { public: CMyClass() {} ~CMyClass() {} int MyInt; }; typedef void* (*fpFunct1)(); fpFunct1 CreateFoo; /*********************************************** Build error because cannot convert from 'HINSTANCE__ *' to 'HINSTANCE__ **' ************************************************/ boost::shared_ptr<HMODULE> spHDL (LoadLibrary("DllMain.dll"), FreeLibrary); // get the function pointer CreateFoo = (fpFunct1)(GetProcAddress(*spHDL, "CreateFooClassInstance")); // get pointer to object auto pMyClass = boost::make_shared<CMyClass*> (static_cast<CMyClass*> (CreateFoo())); (*pMyClass)->MyInt = 9; } // See destructor/custom_deleter …

Member Avatar
Member Avatar
+0 forum 5

I planning to buy an Android phone of medium budget so I need your help to find out the best so it does not hangs and works smoothly, it should support most apps in the play store?

Member Avatar
Member Avatar
+0 forum 3

Ok, here's the history of the problem. I have 80GB Hard drive "Samsung sp0411c" and I am using it since two years with my old desktop system with this S.M.A.R.T error at the startup (BIOS). **TWO YEARS BACK** I think there are some bad sectors involved at the last part of the HDD space. There were 4 partitions initially i.e. (C, D, E, & F). The problem started with partition F with following issues; ? Always took so long copying files into F ? System got stuck up when some file(s), folder(s) from F drive were opened and then automatic …

Member Avatar
Member Avatar
+0 forum 2

i have have to develop a website that can read/write in information from smart card readers and save into database. i'm using C# programming language and asp.net website to do it..i have no idea how to go about doing it.pls help me...If you have sample codes or if you have knowledge in doing it...thanks you so much sir.

Member Avatar
Member Avatar
+0 forum 1

Hello,everbody. In many cases we should fill some fields on the different forms and in the different places of those forms which are the same like as; names,address,numbers,etc. I want to write a program with C++ or other languages that resident in a PC so that it can be simply address some words or sentences[like as; names,address,numbers,etc.] to the special lines or fields of a form or forms to ommit filling and typing the same words or sentences in the lines or fields of forms. Would you please help me for that?Which language is useful for that?And how and from …

Member Avatar
Member Avatar
+0 forum 1

Logfile of Trend Micro HijackThis v2.0.4 Scan saved at 12:17:34 AM, on 5/14/2012 Platform: Windows XP SP3 (WinNT 5.01.2600) MSIE: Internet Explorer v8.00 (8.00.6001.18702) Boot mode: Normal Running processes: C:\WINDOWS\System32\smss.exe C:\WINDOWS\system32\winlogon.exe C:\WINDOWS\system32\services.exe C:\WINDOWS\system32\lsass.exe C:\WINDOWS\system32\Ati2evxx.exe C:\WINDOWS\system32\svchost.exe C:\WINDOWS\System32\svchost.exe C:\WINDOWS\system32\Ati2evxx.exe C:\WINDOWS\system32\spoolsv.exe C:\Program Files\Belkin\Router Setup and Monitor\BelkinService.exe C:\Program Files\Belkin\Belkin USB Print and Storage Center\BkBackupScheduler.exe C:\Program Files\Belkin\Belkin USB Print and Storage Center\Bkapcs.exe C:\Program Files\hpq\HP Wireless Assistant\HP Wireless Assistant.exe C:\Program Files\McAfee\Common Framework\UdaterUI.exe C:\Program Files\QuickTime\qttask.exe C:\Program Files\Malwarebytes' Anti-Malware\mbamgui.exe C:\Program Files\Common Files\Command Software\dvpapi.exe C:\WINDOWS\system32\ctfmon.exe C:\Program Files\Messenger\msmsgs.exe C:\Program Files\McAfee\Common Framework\McTray.exe C:\WINDOWS\system32\svchost.exe C:\WINDOWS\system32\svchost.exe C:\Program Files\Common Files\LightScribe\LSSrvc.exe C:\Program Files\Malwarebytes' Anti-Malware\mbamservice.exe C:\Program Files\McAfee\Common Framework\FrameworkService.exe C:\Program Files\Common Files\Motive\McciCMService.exe C:\Program Files\McAfee\VirusScan Enterprise\Mcshield.exe C:\Program Files\McAfee\VirusScan …

Member Avatar
Member Avatar
+0 forum 2

Short story, I use to use a 1TB drive and need to upgrade since I have many more files on 3 separate 500GB drives. So I decided to buy a 2TB to replace that drive and put the 1TB in a separate lower power pc just for downloading / seeds. I bought the drive online and received it today, so I started transferring files; my one major file (800GB) to the new 2TB drive and watched for a little over 1/2 hour and had to leave. Coming back I had 2 different programs, and a windows notification telling me the …

Member Avatar
Member Avatar
+0 forum 2

hi, i am developing a website of reading newspapers and magazines..in a page where it shows 6 different newspapers in grid view in horizontal view in tablet, same page when twisted vertically should show only 4 in grid view.... how this can be done...any ideas please Regards, Praveen

Member Avatar
Member Avatar
+0 forum 1

Hello everyone, I am currently employed by a cell phone provider and i am looking for a place to spread my knowledge and help those who need help. I know alot about phones and thier operation and the systems they opperate on. if I can't answer your question ill use the vast ammounts of knowedge at my fingertips to find those answers. please don't turn this thread into a place where you poke fun at any companies or products as i am looking to help people and not degrade any company or product.

Member Avatar
+0 forum 0

I have a small network (50-65 computers) which are all connected via a LAN. I have a DHCP server and a gateway (Firewall). Recently there was a requirement to connect all the smart phones used in the company (Blackberry, Iphone and Android phones) to the internet when in the facility through our network. Hence I purchased a access point router and a wireless router. I configured it as below 1. Gave it a static IP 2. Made it a DHCP forwarder , so that it gets the IP to be assigned from the DHCP server. 3. Created a SSID and …

Member Avatar
+0 forum 0

Hi, I am firs time on this forum. I am looking for somebody to develop smart card system for pay per use tanning beds. Anyone interested please contact me.

Member Avatar
Member Avatar
-3 forum 1

The End.