コード例 #1
0
ファイル: MainWindow.cpp プロジェクト: dibben/NoteTaker
void MainWindow::closeEvent(QCloseEvent* ev)
{
	SaveCurrent();
	SaveAll();
	SaveSettings();
	QDialog::closeEvent(ev);
}
コード例 #2
0
ファイル: EditorManager.cpp プロジェクト: wangyanxing/Demi3D
 void DiEditorManager::Command_ToolNew(const MyGUI::UString& _commandName, bool& _result)
 {
     DiString msg;
     
     if (!mFxFileName.empty())
         msg = "Do you want to keep the new effects?";
     else
         msg = "Do you want to save the effects?";
     
     auto msgBox = MyGUI::Message::createMessageBox("Message", "New",
                                                 msg.c_str(),
                                                 MyGUI::MessageBoxStyle::Yes|MyGUI::MessageBoxStyle::No|
                                                 MyGUI::MessageBoxStyle::Cancel|MyGUI::MessageBoxStyle::IconDefault);
     
     msgBox->eventMessageBoxResultLambda = [this](MyGUI::Message*, MyGUI::MessageBoxStyle style){
         if(style == MyGUI::MessageBoxStyle::Yes)
         {
             SaveAll();
             NewFx();
         }
         else if(style == MyGUI::MessageBoxStyle::No)
         {
             NewFx();
         }
     };
     _result = true;
 }
コード例 #3
0
void CAddBuilding::OnBnClickedOk()
{
	

		SaveAll();//scan,常要特意选择一个COM,即使看到的是正确也要选一下,否则就说串口号不对
// 		CMainFrame* pMain = (CMainFrame*)AfxGetApp()->m_pMainWnd;
// 		pMain->Treestatus();
//	OnOK();
}
コード例 #4
0
ファイル: EditorManager.cpp プロジェクト: wangyanxing/Demi3D
 void DiEditorManager::SaveAll()
 {
     if (!mFxFileName.empty())
     {
         SaveAll(mFxFileName);
     }
     else
     {
         void* wndHandle = DiBase::Driver->GetMainRenderWindow()->GetWindow()->GetWndHandle();
         
         DiVector<DiString> out;
         DiString filter = "XML effect file(fx)|*.fx|All files (*.*)|*.*";
         DiPathLib::SaveFileDialog(wndHandle, "Effect file", DiPathLib::GetApplicationPath(), "", filter, 0, out);
         if (out.size() >= 1)
         {
             SaveAll(out[0]);
         }
     }
 }
コード例 #5
0
ファイル: saveall.c プロジェクト: chengjf/SaveAll
//---------------------------------------------------------------------------
// The menu item got selected
void OnMenuClick(int Index)
{
    switch (Index)
    {
    case 1 : {
        SaveAll();
        break;
    }
    }
}
コード例 #6
0
ファイル: PrgCat.c プロジェクト: dblarsson/NiKom
int __saveds __asm LIBSaveProgramCategory( register __d0 int usernumber, register __a6 struct NiKomBase *NiKomBase)
{
	struct ProgramDataCache *prgdata;

	prgdata = CheckifUserisCached(usernumber, NiKomBase);
	if(prgdata == NULL)
		return(0);

	SaveAll(usernumber, prgdata->PrgCat);
	return(1);
}
コード例 #7
0
ファイル: blobtrackgenyml.cpp プロジェクト: 353/viewercv
    ~CvBlobTrackGenYML() {
        int i;
        SaveAll();

        for (i = m_TrackList.GetBlobNum(); i > 0; --i) {
            DefBlobTrack* pTrack = (DefBlobTrack*)m_TrackList.GetBlob(i - 1);
            /* Delete sequence: */
            delete pTrack->pSeq;
            pTrack->pSeq = NULL;
        }   /* Check next track. */

    }   /* Destructor. */
コード例 #8
0
bool HierarchyTreeController::NewProject(const QString& projectPath)
{
	hierarchyTree.CreateProject();
	
	bool res = SaveAll(projectPath);
	if (res)
	{
		emit ProjectCreated();
	}
	
	return res;
}
コード例 #9
0
ファイル: interface.c プロジェクト: Shaijan/Meridian59
void InterfaceReloadSystem()
{
	EnterServerLock();
	
	lprintf("InterfaceReloadSystem reloading system\n");
	
	PauseTimers();
	
	SendBlakodBeginSystemEvent(SYSEVENT_RELOAD_SYSTEM);
	
	GarbageCollect();
	SaveAll();
	
	ResetAdminConstants();
	ResetUser();
	ResetString();
	ResetRoomData();
	ResetLoadMotd();
	ResetLoadBof();
	ResetDLlist();
	ResetNameID();
	ResetResource();
	ResetTimer();
	ResetList();
	ResetObject();
	ResetMessage();
	ResetClass();
	
	LoadMotd();
	LoadBof();
	LoadRsc();
	
	LoadKodbase();
	
	UpdateSecurityRedbook();
	
	LoadAdminConstants();
	/* can't reload accounts because sessions have pointers to accounts */
	if (!LoadAllButAccount()) 
		eprintf("InterfaceReloadSystem couldn't load game.  You are dead.\n");
	
	AllocateParseClientListNodes(); /* it needs a list to send to users */
	AddBuiltInDLlist();
	
	SendBlakodEndSystemEvent(SYSEVENT_RELOAD_SYSTEM);
	
	UnpauseTimers();
	
	LeaveServerLock();
}
コード例 #10
0
ファイル: brfData.cpp プロジェクト: cfcohen/openbrf
bool BrfData::Save(FILE *f) const{
	globVersion = version;
	if (globVersion==1) { SaveString(f, "rfver "); SaveInt(f,1); }
  SaveAll(f,texture);
  SaveAll(f,shader);
  SaveAll(f,material);
  SaveAll(f,mesh);
  SaveAll(f,skeleton);
  SaveAll(f,animation);
  SaveAll(f,body);

  SaveString(f,"end");
  return true;
}
コード例 #11
0
ファイル: blobtrackgenyml.cpp プロジェクト: 353/viewercv
    void    Process(IplImage* pImg = NULL, IplImage* /*pFG*/ = NULL) {
        int i;
        m_Size = cvSize(pImg->width, pImg->height);

        for (i = m_TrackList.GetBlobNum(); i > 0; --i) {
            DefBlobTrack* pTrack = (DefBlobTrack*)m_TrackList.GetBlob(i - 1);

            if (pTrack->FrameLast < m_Frame && !pTrack->Saved) {
                /* Save track: */
                SaveAll();
            }   /* Save track. */

        }   /* Check next track. */

        m_Frame++;
    }
コード例 #12
0
ファイル: uploadswnd.cpp プロジェクト: pedia/raidget
LRESULT CUploadsWnd::OnAppExit(WPARAM, LPARAM)
{
	if (m_pwndUploads)
		m_pwndUploads->StopAllUploads (FALSE);

	while (m_pwndUploads->get_UploadsStat ()->IsUploadsRunning ())
	{
		Sleep (10);
		MSG msg;
		while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
			DispatchMessage (&msg);
	}

	SaveAll ();

	return 0;
}
コード例 #13
0
ファイル: interface.c プロジェクト: Shaijan/Meridian59
void InterfaceSave()
{
	EnterServerLock();
	
	lprintf("InterfaceSave saving\n");
	
	PauseTimers();
	SendBlakodBeginSystemEvent(SYSEVENT_SAVE);
	/* ResetRoomData(); */
	GarbageCollect();
	SaveAll();
	AllocateParseClientListNodes(); /* it needs a list to send to users */
	SendBlakodEndSystemEvent(SYSEVENT_SAVE);
	UnpauseTimers();
	
	LeaveServerLock();
}
コード例 #14
0
ファイル: KStatDataManager.cpp プロジェクト: viticm/pap2
void KStatDataManager::Activate()
{
    if (g_pSO3GameCenter->m_nWorkLoop % (GAME_FPS * 60) == 0)
    {
        time_t nCurrentTime = (g_pSO3GameCenter->m_nTimeNow / 3600) * 3600; // 对齐到小时

        SaveAll();

        if (nCurrentTime != m_nStatTime)
        {
            memset(m_StatValues, 0, sizeof(m_StatValues));
            m_nMaxUsedID = 0;

            m_nStatTime = nCurrentTime;
        }
    }
}
コード例 #15
0
ファイル: SpiderWnd.cpp プロジェクト: naroya/fdm
LRESULT CSpiderWnd::OnAppExit(WPARAM, LPARAM)
{
	SaveAll (TRUE);
	return 0;
}
コード例 #16
0
ファイル: fsUploadsMgr.cpp プロジェクト: naroya/freedownload
BOOL fsUploadsMgr::LoadAll()
{
	for (int j = 0; j < 9; j++) 
	{
		if (m_pbFileCellBusy [j])
		{
			HANDLE ev = CreateEvent (NULL, TRUE, FALSE, "ev - fumcore - saveall");
			SetEvent (ev);
			Sleep (100);
			ResetEvent (ev);
			CloseHandle (ev);
			break;
		}
	}
	
	char sz [MAX_PATH];
	_pDllCaller->GetDataFilePath ("", sz);

	WaitForSingleObject (m_mxAccFiles, INFINITE);

	CString str1stEmpty;
	int n1stEmpty = -1;
	int n1stFullyLoaded = -1;

	std::vector <CString> vFullyLoaded, vFailedLoad;

	int i = 0;
	for (i = 0; i < 9; i++)
	{
		CString str; 
		str.Format ("%suploads.%d.sav", sz, i+1);

		HANDLE hFile = CreateFile (str, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
		if (hFile == INVALID_HANDLE_VALUE)
		{
			if (n1stEmpty == -1 && GetFileAttributes (str) == DWORD (-1))
			{
				str1stEmpty = str;
				n1stEmpty = i;
			}
			continue;
		}

		fsULFileHdr hdr; DWORD dw;
		if (FALSE == ReadFile (hFile, &hdr, sizeof (hdr), &dw, NULL))
			goto _lErr;

		if (lstrcmp (hdr.szSig, ULFILE_SIG) || hdr.wVer > ULFILE_CURRENT_VERSION)
			goto _lErr;
		
		if (FALSE == LoadUploads (hFile, m_pbFileCellBusy [i], hdr.wVer))
		{
			vFailedLoad.push_back (str);
			goto _lErr;
		}

		if (m_pbFileCellBusy [i] == FALSE)
		{
			vFullyLoaded.push_back (str);
			if (n1stFullyLoaded == -1)
				n1stFullyLoaded = i;
		}

	_lErr:
		CloseHandle (hFile);
	}

	if (vFullyLoaded.size () != 0)
		m_nFile = n1stFullyLoaded;
	else
		m_nFile = n1stEmpty;
	m_pbFileCellBusy [m_nFile] = TRUE;

	if (vFullyLoaded.size () > 1)
	{
		SaveAll ();
		for (int i = 1; i < (int)vFullyLoaded.size (); i++)
			DeleteFile (vFullyLoaded [i]);
	}

	for (i = 0; i < (int)vFailedLoad.size (); i++)
		DeleteFile (vFailedLoad [i]);

	ReleaseMutex (m_mxAccFiles);

	DWORD dw;
	CloseHandle (
		CreateThread (NULL, 0, _threadSaveAll, this, 0, &dw));

	ProcessUploads ();

	return TRUE;
}
コード例 #17
0
ファイル: interface.c プロジェクト: saniv/freecraft-ale-clone
/**
**	Handle keys in command mode.
**
**	@param key	Key scancode.
**	@return		True, if key is handles; otherwise false.
*/
local int CommandKey(int key)
{
    switch( key ) {
	case '\r':
	    KeyState=KeyStateInput;
	    Input[0]='\0';
	    InputIndex=0;
	    ShowInput();
	    return 1;
	case '^':
	    UnSelectAll();
            break;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':
            if( KeyModifiers&ModifierControl ) {
                //  dirty atoi version :)
                SetGroup(Selected,NumSelected,key-48);
            } else {
                SelectGroup(key-48);
            }
            UpdateBottomPanel();
            MustRedraw|=RedrawCursor|RedrawMap|RedrawPanels;
            break;
#if 0
    IfDebug(
	case '0':
	    ++ThisPlayer;
	    if( ThisPlayer==&Players[PlayerMax] ) {
		ThisPlayer=&Players[0];
	    }
	    MustRedraw=RedrawEverything;
	    break;

	case '1':
	    --ThisPlayer;
	    if( ThisPlayer<&Players[0] ) {
		ThisPlayer=&Players[PlayerMax-1];
	    }
	    MustRedraw=RedrawEverything;
	    break;
    );
#endif
        case KeyCodePause:
	case 'P':			// If pause-key didn't work
            if(GamePaused) {
                GamePaused=0;
                SetStatusLine("Game Resumed");
	    } else {
                GamePaused=1;
                SetStatusLine("Game Paused");
	    }
	    break;

	case KeyCodeF10:
	    InterfaceState=IfaceStateMenu;
	    GamePaused=1;
	    SetStatusLine("Game Paused");
	    ProcessMenu(MENU_GAME);
	    break;

	case '+':
	    VideoSyncSpeed+=10;
	    InitVideoSync();
	    SetStatusLine("Faster");
	    break;

	case '-':
	    VideoSyncSpeed-=10;
	    InitVideoSync();
	    SetStatusLine("Slower");
	    break;

	case 'S':			// SMALL s is needed for panel
	    SaveAll();
	    break;

	case 'c':
	    if(	NumSelected==1 ) {
		MapCenter(Selected[0]->X,Selected[0]->Y);
	    }
	    break;

//	TAB toggles minimap.
//	FIXME: more...
	case '\t':
	    DebugLevel1("TAB\n");
	    MinimapWithTerrain^=1;
	    MustRedraw|=RedrawMinimap;
	    break;
	    // FIXME: shift+TAB

	case 'q':
	    Exit(0);
	case KeyCodeUp:
	    if( MapY ) {
		if( KeyModifiers&ModifierControl ) {
		    if( MapY<MapHeight/2 ) {
			MapY=0;
		    } else {
			MapY-=MapHeight/2;
		    }
		} else {
		    --MapY;
		}
		MustRedraw|=RedrawMaps|RedrawMinimapCursor;
	    }
	    break;
	case KeyCodeDown:
	    if( MapY<TheMap.Height-MapHeight ) {
		if( KeyModifiers&ModifierControl ) {
		    if( MapY<TheMap.Height-MapHeight-MapHeight/2 ) {
			MapY+=MapHeight/2;
		    } else {
			MapY=TheMap.Height-MapHeight;
		    }
		} else {
		    ++MapY;
		}
		MustRedraw|=RedrawMaps|RedrawMinimapCursor;
	    }
	    break;
	case KeyCodeLeft:
	    if( MapX ) {
		if( KeyModifiers&ModifierControl ) {
		    if( MapX<MapWidth/2 ) {
			MapX=0;
		    } else {
			MapX-=MapWidth/2;
		    }
		} else {
		    --MapX;
		}
		MustRedraw|=RedrawMaps|RedrawMinimapCursor;
	    }
	    break;
	case KeyCodeRight:
	    if( MapX<TheMap.Width-MapWidth ) {
		if( KeyModifiers&ModifierControl ) {
		    if( MapX<TheMap.Width-MapWidth-MapWidth/2 ) {
			MapX+=MapWidth/2;
		    } else {
			MapX=TheMap.Width-MapWidth;
		    }
		} else {
		    ++MapX;
		}
		MustRedraw|=RedrawMaps|RedrawMinimapCursor;
	    }
	    break;

	default:
	    DebugLevel3("Key %d\n",key);
	    return 0;
    }
コード例 #18
0
ファイル: WatchWindow.cpp プロジェクト: OrN/dolphin
void CWatchWindow::Event_SaveAll(wxCommandEvent& WXUNUSED(event))
{
  SaveAll();
}
コード例 #19
0
ファイル: SpiderWnd.cpp プロジェクト: naroya/freedownload
LRESULT CSpiderWnd::OnAppExit(WPARAM, LPARAM)
{
	m_mgr.SetEventsFunc (NULL, NULL);
	SaveAll (0xffffffff);
	return 0;
}
コード例 #20
0
ファイル: BreakpointWindow.cpp プロジェクト: Annovae/dolphin
void CBreakPointWindow::OnClose(wxCloseEvent& event)
{
	SaveAll();
	event.Skip();
}
コード例 #21
0
ファイル: ResourceGUI.cpp プロジェクト: arocchi/Klampt
bool ResourceGUIBackend::OnCommand(const string& cmd,const string& args)
{
  if(cmd == "set_resource") {
    resources->Select(args);
    return true;      
  }
  else if(cmd == "get_resource") {
    stringstream ss;
    ss<<resources->selected->Identifier();
    SendCommand("current_resource",ss.str());
    return true;
  }
  else if(cmd == "set_resource_name") {
    if(resources->selected) resources->selected->resource->name = args;
    printf("Updating name to %s\n",args.c_str());
  }
  else if(cmd == "delete_resource") {
    resources->DeleteSelected();
  }
  else if(cmd == "add_resource") {
    string type,name;
    stringstream ss(args);
    if(!SafeInputString(ss,type)) {
      cout<<"Error reading resource type from args \""<<args<<"\""<<endl;
      return true;
    }
    if(!SafeInputString(ss,name)) {
      cout<<"Error reading resource name from args \""<<args<<"\""<<endl;
      return true;
    }
    last_added = Add(name,type);
  }
  else if(cmd == "load_resource") {
    if(LoadNew(args)) {
      SendCommand("new_resource",last_added->Identifier());
    }
  }
  else if(cmd == "save_resource") {
    SaveCur(args);
  }
  else if(cmd == "load_resource_dir") {
    if(LoadAll(args)) {
      SendCommand("refresh_resources","");
    }
  }
  else if(cmd == "save_resource_dir") {
    SaveAll(args);
  }
  else if(cmd == "convert") {
    ResourcePtr r=CurrentResource();
    ResourcePtr res = CastResource(r,args.c_str());
    if(!res) {
      fprintf(stderr,"Conversion failed\n");
      return true;
    }
    Add(res);     
    SetLastActive();
  }
  else if(cmd == "extract") {
    ResourcePtr r=CurrentResource();
    if(!r) return true;
    vector<ResourcePtr> res = ExtractResources(r,args.c_str());
    for(size_t i=0;i<res.size();i++){
      Add(res[i]);     
    }
    if(!res.empty())
      SetLastActive();
  }
  else if(cmd == "set_path_time") {
    stringstream ss(args);
    double time;
    ss>>time;
    SetPathTime(time);
    SendRefresh();
  }
コード例 #22
0
ファイル: compiler.cpp プロジェクト: chronoxor/TrueTemplate
static bool runCompiler (const EditorInfoEx *ei, const TLang *lng, const wchar_t *fn, const wchar_t *path, const wchar_t *title, const TExec *e)
{
	wchar_t	cwd[NM] = L"", baseFile[NM] = L"";
	if (!e->enable.empty())
	{
		wchar_t	temp[NM];
		makeCmdLine (false, baseFile, e->enable, path, fn);

		bool	enable = isFile (baseFile);
		if (!enable && e->searchBase && findBaseFile (path, baseFile, temp)) wcscpy (baseFile, temp);
	}

	if (!makeCmdLine (true, cmd, e->cmd, path, fn, makeTitle (title, 30, path, fn))) return (false);
	wcscpy(cmdpath, path);
	wchar_t	temp[NM];
	wcscpy(temp, cmd);
	ExpandEnvironmentStrings (temp, cmd, NM);

	if (e->saveType != saNone)
	{
		if (e->saveType == saCurrent)
		{
			wchar_t	witypename[NM];
			wchar_t	winame[NM];
			WindowInfoEx	wi;
			wi.TypeName = witypename;
			wi.TypeNameSize = NM;
			wi.Name = winame;
			wi.NameSize = NM;
			wi.Pos = -1;
			Info.AdvControl (&MainGuid, ACTL_GETWINDOWINFO, 0, (void *) &wi);
			if (wi.Type == WTYPE_EDITOR && (wi.Flags & WIF_MODIFIED))
				if (!Info.EditorControl (-1, ECTL_SAVEFILE, 0, nullptr)) return (false);
		}
		else
		{
			if (!SaveAll ())
			{
				const wchar_t *MsgItems[] = { GetMsg (MTitle), GetMsg (MSaveError), GetMsg (MContinue) };
				if (Info.Message (&MainGuid, &RunCompilerGuid, FMSG_MB_YESNO, nullptr, MsgItems, _countof (MsgItems), 0)) return (false);
			}
		}
	}

	if (e->cd != cdNone)
	{
		wchar_t	newDir[NM] = L"", *p;
		if (e->cd == cdFile)
			p = wcsrchr (wcscpy (newDir, fn), L'\\');
		else if ((e->cd == cdBase) && *baseFile)
			p = wcsrchr (wcscpy (newDir, baseFile), L'\\');
		if (p) *p = 0;
		if (*newDir)
		{
			GetCurrentDirectory (_countof (cwd), cwd);
			SetCurrentDirectory (newDir);
		}
	}

	if (compilerOutColl)
		compilerOutColl->removeAll ();
	else
		compilerOutColl = new TCollection<TOutputLine>;

	if (errColl)
		errColl->removeAll ();
	else
		errColl = new TCollection<TErrData>;

	compilerOutP = -1;
	execute (compilerOutColl, cmd, e->echo);

	size_t	n = compilerOutColl->getCount ();
	if (n)
	{
		intptr_t nErr = 0, aj = -1;
		compilerOut = new FarMenuItemEx[compilerOutN = n + 1];
		for (size_t i = 0; i < n; i++)
		{
			const TOutputLine *outData = (*compilerOutColl)[i];
			const wchar_t	*line = outData->line;
			compilerOut[i].Text = line;
			compilerOut[i].Flags = MIF_DISABLE;
			compilerOut[i].UserData = 0;

			wchar_t	compiler[MAX_STR_LEN];
			wcscpy (compiler, e->compiler);

			wchar_t	*pp, *p = compiler;
			bool	found = false;
			while ((pp = wcschr (p, L',')) != nullptr)
			{
				*pp = 0;
				if (parseError (lng, p, path, fn, line, i, aj))
				{
					nErr++;
					found = true;
				}

				p = pp + 1;
				if (found) break;
			}

			if (!found && parseError (lng, p, path, fn, line, i, aj)) nErr++;
		}

		if ((aj >= 0) && ((e->jumpType == jtFirst)) || ((e->jumpType == jtSmart) && (nErr == 1)))
			jumpToError (ei, path, aj, true);
		else
		{
			if (aj < 0)
			{
				if (compilerOut[n - 1].Text[0] == 0)
				{
					compilerOutN--;
					n--;
				}

				compilerOut[n].Text = L"";
				compilerOut[n].Flags = MIF_SELECTED;
			}
			else
				compilerOutN--;
			if ((e->jumpType == jtMenu) || (e->jumpType == jtSmart)) showCompileOut (ei, path);
		}
	}
	else if (compilerOut)
	{
		delete compilerOutColl;
		compilerOutColl = nullptr;
		delete[] compilerOut;
		compilerOut = nullptr;
	}

	if (*cwd) SetCurrentDirectory (cwd);
	return (true);
}
コード例 #23
0
ファイル: EditorManager.cpp プロジェクト: wangyanxing/Demi3D
 void DiEditorManager::Command_ToolSave(const MyGUI::UString& _commandName, bool& _result)
 {
     SaveAll();
     _result = true;
 }
コード例 #24
0
ファイル: SitesWnd.cpp プロジェクト: andyTsing/freedownload
LRESULT CSitesWnd::OnAppExit(WPARAM, LPARAM)
{
	SaveAll (0xffffffff);
	return 0;
}
コード例 #25
0
LRESULT CFlashVideoDownloadsWnd::OnAppExit(WPARAM, LPARAM)
{
	SaveAll (0xffffffff);
	return 0;
}
コード例 #26
0
ファイル: BreakpointWindow.cpp プロジェクト: Annovae/dolphin
void CBreakPointWindow::Event_SaveAll(wxCommandEvent& WXUNUSED(event))
{
	SaveAll();
}
コード例 #27
0
int main(int argc, char* argv[])
{
	cout << "START...\n";
	THash< TChA , TUInt > posts;
	TZipIn ZpostsIn("/NS/twitter-5/work/oaskaris/PostsData.rar");
	posts.Load(ZpostsIn);
	printf("PostsData loading done, it contains %d posts.\n",posts.Len());

	TZipIn z2("CascadesFullUrlsOnTwitterData.rar");
	cascadesInUrlsOnTwitter.Load(z2);
	printf("CascadesFullUrlsOnTwitterData loading done, it contains %d items.\n",cascadesInUrlsOnTwitter.Len());

	TZipIn ZquotesIn("/NS/twitter-5/work/oaskaris/QuotesPreprocessedData_NIFTY.rar");
	preprocessedQuotes.Load(ZquotesIn);
	printf("QuotesPreprocessedData_NIFTY loading done, it contains %d quotes.\n",preprocessedQuotes.Len());

	int qoId = 1337058;
	cout << "\n\nQUOTE: " << preprocessedQuotes.GetKey(qoId).CStr() << endl << endl;
	for(int l=0;l<preprocessedQuotes[qoId].Len();l++)
	{
		cout << posts.GetKey(preprocessedQuotes[qoId][l].post).CStr() << " : " << preprocessedQuotes[qoId][l].time.GetYmdTmStr().CStr() << endl;
	}
	return 0;


	int cnt = 3;
	bool printed = false;
	while(!printed)
	{
		cnt++;
		for(int l=0;l<cascadesInUrlsOnTwitter.Len();l++)
		{
			int qID = cascadesInUrlsOnTwitter.GetKey(l);
			if(cascadesInUrlsOnTwitter[l][0].GetAbsSecs() < preprocessedQuotes[qID][0].time.GetAbsSecs())
			{
				if(preprocessedQuotes[qID].Len() > cnt)
				{
					continue;
				}
				printed = true;
				cout << "Twitter time: " << cascadesInUrlsOnTwitter[l][0].GetYmdTmStr().CStr() << endl;
				cout << "Memes time: " << preprocessedQuotes[qID][0].time.GetYmdTmStr().CStr() << endl;
				cout << "QID: " << qID << endl;
				cout << "\n\n\n";
			}
		}
	}
	return 0;



//	TZipIn z1("CascadesRawUrlsOnTwitterData.rar");
//	cascadesInUrlsOnTwitter.Load(z1);
//	printf("CascadesRawUrlsOnTwitterData loading done, it contains %d items.\n",cascadesInUrlsOnTwitter.Len());
//	long long l1 = 0;
//	for(int i=0;i<cascadesInUrlsOnTwitter.Len();i++)
//	{
//		l1+=cascadesInUrlsOnTwitter[i].Len();
//	}
//	cascadesInUrlsOnTwitter.Clr();
//
//	TZipIn z2("CascadesFullUrlsOnTwitterData.rar");
//	cascadesInUrlsOnTwitter.Load(z2);
//	printf("CascadesFullUrlsOnTwitterData loading done, it contains %d items.\n",cascadesInUrlsOnTwitter.Len());
//	long long l2 = 0;
//	for(int i=0;i<cascadesInUrlsOnTwitter.Len();i++)
//	{
//		l2+=cascadesInUrlsOnTwitter[i].Len();
//	}
//
//	cout << "\n\n\nRaw All Items: " << l1 << "\n" << "Full All Items: " << l2 << endl;
//	return 0;


//	TZipIn resIn("CascadesUrlsOnTwitterData.rar");
//	cascadesInUrlsOnTwitter.Load(resIn);
//	printf("The size of CascadesUrlsOnTwitter was: %d\n",cascadesInUrlsOnTwitter.Len());
//	for(int l=0;l<5;l++)
//	{
//		printf("\n\n\nQ%d:\n\n",l);
//		for(int o=0;o<cascadesInUrlsOnTwitter[l].Len();o++)
//		{
//			printf("%d. %s\n",o,cascadesInUrlsOnTwitter[l][o].GetYmdTmStr().CStr());
//		}
//	}
//	return 0;


	TExeTm ExeTm;
	unsigned int q,p;
	int id,i;
	TSecTmV* cascade;
	TSecTmV* res;
	Env = TEnv(argc, argv, TNotify::StdNotify);
	Env.PrepArgs(TStr::Fmt("\n***(((Finding the cascades of the desired quotes in their urls)))***. build: %s, %s. Time: %s", __TIME__, __DATE__, TExeTm::GetCurTm()));
	try
	{
		TZipIn ZquotesIn("/NS/twitter-5/work/oaskaris/QuotesPreprocessedData_NIFTY.rar");
		preprocessedQuotes.Load(ZquotesIn);
		printf("QuotesPreprocessed loading done, it contains %d quotes.\n",preprocessedQuotes.Len());

		TZipIn ZpostsPropIn("PostsPropagatedOverTwitterFullUrls.rar");
		postsPropagatedOverTw.Load(ZpostsPropIn);
		printf("PostsPropagatedOverTwitterFullUrls loading done, it contains %d items.\n",postsPropagatedOverTw.Len());


		for(q=0;q<preprocessedQuotes.Len();q++)
		{
			for(p=0;p<preprocessedQuotes[q].Len();p++)
			{
				TUInt postId = preprocessedQuotes[q][p].post;
				if(postsPropagatedOverTw.GetKeyId(postId) != -1)
				{
					cascade = &postsPropagatedOverTw.GetDat(postId);
					id = cascadesInUrlsOnTwitter.GetKeyId(q);
					if(id == -1)
					{
						res = &cascadesInUrlsOnTwitter.AddDat(q);
						for(i=0;i<cascade->Len();i++)
						{
							res->AddSorted((*cascade)[i]);
						}
					}
					else
					{
						res = &cascadesInUrlsOnTwitter.GetDat(q);
						for(i=0;i<cascade->Len();i++)
						{
							res->AddSorted((*cascade)[i]);
						}
					}
				}
			}
		}

		printf("\n\nFINDING THE CASCADES OF QUOTES WITH URLS OVER TWITTER IS DONE\n\n");

		SaveAll();
	}
	catch(exception& ex)
	{
		SaveAll();
		printf("\nError1 happened, it was: %s\n\n",ex.what());
	}
	catch(TPt<TExcept>& ex)
	{
		SaveAll();
		printf("\nError2 happened: %s\n\n",ex[0].GetStr().CStr());
	}

	printf("\nrun time: %s (%s)\n", ExeTm.GetTmStr(), TSecTm::GetCurTm().GetTmStr().CStr());
	return 0;
}