void FileChooser::UpdateEditor() { int index = browser()->Selection(); if (index >= 0) { _sedit->Message(browser()->Path(index)); browser()->UnselectAll(); } else { _sedit->Message(browser()->Normalize(_sedit->Text())); } SelectFile(); }
void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { switch (cmd) { case kChooseSaveDirCmd: { BrowserDialog browser("Select directory for savegames", true); if (browser.runModal() > 0) { // User made his choice... FilesystemNode dir(browser.getResult()); _savePath->setLabel(dir.path()); draw(); // TODO - we should check if the directory is writeable before accepting it } break; } case kChooseThemeDirCmd: { BrowserDialog browser("Select directory for GUI themes", true); if (browser.runModal() > 0) { // User made his choice... FilesystemNode dir(browser.getResult()); _themePath->setLabel(dir.path()); draw(); } break; } case kChooseExtraDirCmd: { BrowserDialog browser("Select directory for extra files", true); if (browser.runModal() > 0) { // User made his choice... FilesystemNode dir(browser.getResult()); _extraPath->setLabel(dir.path()); draw(); } break; } case kChooseSoundFontCmd: { BrowserDialog browser("Select SoundFont", false); if (browser.runModal() > 0) { // User made his choice... FilesystemNode file(browser.getResult()); _soundFont->setLabel(file.path()); draw(); } break; } #ifdef SMALL_SCREEN_DEVICE case kChooseKeyMappingCmd: _keysDialog->runModal(); break; #endif default: OptionsDialog::handleCommand(sender, cmd, data); } }
// ---------------------------------------------------------------------------- // ThingPropsPanel::onSpriteClicked // // Called when the thing type sprite canvas is clicked // ---------------------------------------------------------------------------- void ThingPropsPanel::onSpriteClicked(wxMouseEvent& e) { ThingTypeBrowser browser(this, type_current_); if (browser.ShowModal() == wxID_OK) { // Get selected type type_current_ = browser.getSelectedType(); auto& tt = Game::configuration().thingType(type_current_); // Update sprite gfx_sprite_->setSprite(tt); label_type_->SetLabel(tt.name()); // Update args if (panel_args_) { auto& as = tt.argSpec(); panel_args_->setup(as, (MapEditor::editContext().mapDesc().format == MAP_UDMF)); } // Update layout Layout(); Refresh(); } }
// ----------------------------------------------------------------------------- // Called when a texture canvas is clicked // ----------------------------------------------------------------------------- void SectorPropsPanel::onTextureClicked(wxMouseEvent& e) { // Get canvas FlatTexCanvas* tc = nullptr; FlatComboBox* cb = nullptr; if (e.GetEventObject() == gfx_floor_) { tc = gfx_floor_; cb = fcb_floor_; } else if (e.GetEventObject() == gfx_ceiling_) { tc = gfx_ceiling_; cb = fcb_ceiling_; } if (!tc) { e.Skip(); return; } // Browse MapTextureBrowser browser(this, MapEditor::TextureType::Flat, tc->texName(), &MapEditor::editContext().map()); if (browser.ShowModal() == wxID_OK && browser.selectedItem()) cb->SetValue(browser.selectedItem()->name()); }
/* SectorPropsPanel::onTextureClicked * Called when a texture canvas is clicked *******************************************************************/ void SectorPropsPanel::onTextureClicked(wxMouseEvent& e) { // Get canvas FlatTexCanvas* tc = NULL; FlatComboBox* cb = NULL; if (e.GetEventObject() == gfx_floor) { tc = gfx_floor; cb = fcb_floor; } else if (e.GetEventObject() == gfx_ceiling) { tc = gfx_ceiling; cb = fcb_ceiling; } if (!tc) { e.Skip(); return; } // Browse MapTextureBrowser browser(this, 1, tc->getTexName(), &(theMapEditor->mapEditor().getMap())); if (browser.ShowModal() == wxID_OK) cb->SetValue(browser.getSelectedItem()->getName()); }
int main(int argc, char* argv[]) { Options options; if (!options.parse(argc, argv)) return 1; printf("MiniBrowser: Use Alt + Left and Alt + Right to navigate back and forward. Use F5 to reload.\n"); std::string url = options.url; if (url.empty()) url = "http://www.google.com"; else if (url.find("http") != 0 && url.find("file://") != 0) { std::ifstream localFile(url.c_str()); url.insert(0, localFile ? "file://" : "http://"); } GMainLoop* mainLoop = g_main_loop_new(0, false); MiniBrowser browser(mainLoop, options.desktopModeEnabled ? MiniBrowser::DesktopMode : MiniBrowser::MobileMode, options.width, options.height, options.viewportHorizontalDisplacement, options.viewportVerticalDisplacement); if (options.forceTouchEmulationEnabled || !options.desktopModeEnabled) { printf("Touch Emulation Mode enabled. Hold Control key to build and emit a multi-touch event: each mouse button should be a different touch point. Release Control Key to clear all tracking pressed touches.\n"); browser.setTouchEmulationMode(true); } if (!options.userAgent.empty()) WKPageSetCustomUserAgent(browser.pageRef(), WKStringCreateWithUTF8CString(options.userAgent.c_str())); if (!options.desktopModeEnabled) printf("Use Control + mouse wheel to zoom in and out.\n"); WKPageLoadURL(browser.pageRef(), WKURLCreateWithUTF8CString(url.c_str())); g_main_loop_run(mainLoop); g_main_loop_unref(mainLoop); }
void BrowserBar::polish() { DEBUG_FUNC_INFO QWidget::polish(); uint M = 0; foreachType( BrowserList, m_browsers ) { const uint m = (*it)->minimumWidth(); if( m > M ) M = m; } KConfig* const config = amaroK::config( "BrowserBar" ); const int index = indexForName( config->readEntry( "CurrentPane" ) ); const int width = config->readNumEntry( "Width", browser( index )->sizeHint().width() ); if( M > 250 ) { warning() << "Some browsers are insisting on a silly minimum size! " << M << endl; M = 250; } m_browserBox->setMinimumWidth( M ); m_browserBox->resize( width, height() ); if( index != -1 ) // if we did it for -1 it ruins the browserBox size showHideBrowser( index ); }
// ----------------------------------------------------------------------------- // Opens the texture browser for [tex_type] textures, with [init_texture] // initially selected. Returns the selected texture // ----------------------------------------------------------------------------- std::string MapEditor::browseTexture( std::string_view init_texture, TextureType tex_type, SLADEMap& map, std::string_view title) { // Unlock cursor if locked bool cursor_locked = edit_context->mouseLocked(); if (cursor_locked) edit_context->lockMouse(false); // Setup texture browser MapTextureBrowser browser(map_window, tex_type, wxString{ init_texture.data(), init_texture.size() }, &map); browser.SetTitle(WxUtils::strFromView(title)); // Get selected texture std::string tex; if (browser.ShowModal() == wxID_OK) tex = browser.selectedItem()->name(); // Re-lock cursor if needed if (cursor_locked) edit_context->lockMouse(true); return tex; }
int main(int argv, char** argc) { QApplication app(argv, argc); app.setOrganizationName("commontk"); app.setOrganizationDomain("commontk.org"); app.setApplicationName("ctkPluginBrowser"); ctkPluginFrameworkFactory fwFactory; ctkPluginFramework* framework = fwFactory.getFramework(); try { framework->init(); } catch (const ctkPluginException& exc) { qCritical() << "Failed to initialize the plug-in framework:" << exc; exit(1); } ctkPluginBrowser browser(framework); browser.show(); return app.exec(); }
bool CServerList::NeedToRefreshCurServer () { CUIListItemServer* pItem = (CUIListItemServer*)m_list[LST_SERVER].GetSelectedItem(); if(!pItem) return false; return browser().HasAllKeys(pItem->GetInfo()->info.Index) == false; };
virtual bool fixProblem(unsigned index, unsigned fix_type, MapEditor* editor) { if (index >= sectors.size()) return false; if (fix_type == 0) { // Browse textures MapTextureBrowser browser(theMapEditor, 1, "", map); if (browser.ShowModal() == wxID_OK) { // Set texture if one selected string texture = browser.getSelectedItem()->getName(); editor->beginUndoRecord("Change Texture"); if (floor[index]) sectors[index]->setStringProperty("texturefloor", texture); else sectors[index]->setStringProperty("textureceiling", texture); editor->endUndoRecord(); // Remove problem sectors.erase(sectors.begin() + index); floor.erase(floor.begin() + index); return true; } return false; } return false; }
void FileChooser::SelectFile() { const char* path = _sedit->Text(); int left = strlen(browser()->ValidDirectories(path)); int right = strlen(path); Select(left, right); }
/* ThingPropsPanel::onSpriteClicked * Called when the thing type sprite canvas is clicked *******************************************************************/ void ThingPropsPanel::onSpriteClicked(wxMouseEvent& e) { ThingTypeBrowser browser(this, type_current); if (browser.ShowModal() == wxID_OK) { // Get selected type type_current = browser.getSelectedType(); ThingType* tt = theGameConfiguration->thingType(type_current); // Update sprite gfx_sprite->setSprite(tt); label_type->SetLabel(tt->getName()); // Update args if (panel_args) { argspec_t as = tt->getArgspec(); panel_args->setup(&as, (theMapEditor->currentMapDesc().format == MAP_UDMF)); } // Update layout Layout(); Refresh(); } }
Interactor* FileChooser::Interior(const char* acptLbl) { const int space = Math::round(.5*cm); VBox* titleblock = new VBox( new HBox(title, new HGlue), new HBox(subtitle, new HGlue) ); return new MarginFrame( new VBox( titleblock, new VGlue(space, 0), new Frame(new MarginFrame(_sedit, 2)), new VGlue(space, 0), new Frame(AddScroller(browser())), new VGlue(space, 0), new HBox( new VGlue(space, 0), new HGlue, new PushButton("Cancel", state, '\007'), new HGlue(space, 0), new PushButton(acptLbl, state, '\r') ) ), space, space/2, 0 ); }
void FacebookProto::OpenUrl(std::string url) { std::string::size_type pos = url.find(FACEBOOK_SERVER_DOMAIN); bool isFacebookUrl = (pos != std::string::npos); bool isRelativeUrl = (url.substr(0, 4) != "http"); if (isFacebookUrl || isRelativeUrl) { // Make realtive url if (!isRelativeUrl) { url = url.substr(pos + strlen(FACEBOOK_SERVER_DOMAIN)); // Strip eventual port pos = url.find("/"); if (pos != std::string::npos && pos != 0) url = url.substr(pos); } // Make absolute url bool useHttps = getByte(FACEBOOK_KEY_FORCE_HTTPS, 1) > 0; url = (useHttps ? HTTP_PROTO_SECURE : HTTP_PROTO_REGULAR) + facy.get_server_type() + url; } ptrT data( mir_utf8decodeT(url.c_str())); // Check if there is user defined browser for opening links ptrT browser(getTStringA(FACEBOOK_KEY_OPEN_URL_BROWSER)); if (browser != NULL) // If so, use it to open this link ForkThread(&FacebookProto::OpenUrlThread, new open_url(browser, data)); else // Or use Miranda's service CallService(MS_UTILS_OPENURL, (WPARAM)OUF_TCHAR, (LPARAM)data); }
void CUpdateDlg::OnBnClickedSparse() { UpdateData(); CString strURLs; CTSVNPathList paths; paths.LoadFromAsteriskSeparatedString (strURLs); SVN svn; CString strUrl = svn.GetURLFromPath(m_wcPath); CRepositoryBrowser browser(strUrl, SVNRev::REV_HEAD, this); browser.SetSparseCheckoutMode(m_wcPath); if (browser.DoModal() == IDOK) { m_checkoutDepths = browser.GetUpdateDepths(); CString sCustomDepth = CString(MAKEINTRESOURCE(IDS_SVN_DEPTH_CUSTOM)); int customIndex = m_depthCombo.FindStringExact(-1, sCustomDepth); if (customIndex == CB_ERR) { customIndex = m_depthCombo.AddString(sCustomDepth); } m_depthCombo.SetCurSel(customIndex); } }
int main(int argc, char *argv[]) { QApplication app(argc, argv); QMainWindow mainWin; mainWin.setWindowTitle(QObject::tr("Qt SQL Browser")); Browser browser(&mainWin); mainWin.setCentralWidget(&browser); QMenu *fileMenu = mainWin.menuBar()->addMenu(QObject::tr("&File")); fileMenu->addAction(QObject::tr("Add &Connection..."), &browser, SLOT(addConnection())); fileMenu->addSeparator(); fileMenu->addAction(QObject::tr("&Quit"), &app, SLOT(quit())); QMenu *helpMenu = mainWin.menuBar()->addMenu(QObject::tr("&Help")); helpMenu->addAction(QObject::tr("About"), &browser, SLOT(about())); helpMenu->addAction(QObject::tr("About Qt"), qApp, SLOT(aboutQt())); QObject::connect(&browser, SIGNAL(statusMessage(QString)), mainWin.statusBar(), SLOT(showMessage(QString))); addConnectionsFromCommandline(app.arguments(), &browser); mainWin.show(); if (QSqlDatabase::connectionNames().isEmpty()) QMetaObject::invokeMethod(&browser, "addConnection", Qt::QueuedConnection); return app.exec(); }
int main(int argc, char * argv[]) { QApplication app(argc, argv); QCommandLineParser commandLineParser; commandLineParser.addPositionalArgument(QStringLiteral("url"), QStringLiteral("The url to be loaded in the browser window.")); commandLineParser.process(app); QStringList positionalArguments = commandLineParser.positionalArguments(); QUrl url; QString year,month,outputPath; int day; if (positionalArguments.size() > 5) { showHelp(commandLineParser, QStringLiteral("Too many arguments.")); return -1; } else if (positionalArguments.size() == 5) { url = QUrl::fromUserInput(positionalArguments.at(0)); year = positionalArguments.at(1); month = positionalArguments.at(2); day = positionalArguments.at(3).toInt(); outputPath = positionalArguments.at(4); } else url = QUrl("http://query.nytimes.com/search/sitesearch/#/crude+oil/from20100502to20100602/allresults/1/allauthors/relevance/business"); if (!url.isValid()) { showHelp(commandLineParser, QString("%1 is not a valid url.").arg(positionalArguments.at(0))); return -1; } MainWindow browser(url,year,month,day,outputPath); browser.show(); return app.exec(); }
void run(bool* const quit_game) { vector<Str_and_clr> lines; mk_info_lines(lines); Menu_browser browser(6, 0); render_menu(browser); while (true) { const Menu_action action = menu_input_handling::get_action(browser); switch (action) { case Menu_action::esc: case Menu_action::space: case Menu_action::selected_shift: {} break; case Menu_action::browsed: { render_menu(browser); } break; case Menu_action::selected: { if (browser.is_at_idx(0)) { run_info(lines); render_menu(browser); } else if (browser.is_at_idx(1)) { mk_memorial_file(lines); } else if (browser.is_at_idx(2)) { high_score::run_high_score_screen(); render_menu(browser); } else if (browser.is_at_idx(3)) { msg_log::display_history(); render_menu(browser); } else if (browser.is_at_idx(4)) { return; } else if (browser.is_at_idx(5)) { *quit_game = true; return; } } break; } } }
SetupGopathDialog::SetupGopathDialog(QWidget *parent) : QDialog(parent), ui(new Ui::SetupGopathDialog) { ui->setupUi(this); connect(ui->browserButton,SIGNAL(clicked()),this,SLOT(browser())); connect(ui->clearButton,SIGNAL(clicked()),ui->litePathTextEdit,SLOT(clear())); }
void CServerList::RefreshGameSpyList(bool Local) { SetSortFunc ("", false); SetSortFunc ("ping", false); browser().RefreshList_Full(Local, m_edit_gs_filter.GetText()); ResetCurItem (); RefreshList (); }
void CServerList::ConnectToSelected() { gamespy_gp::login_manager const * lmngr = MainMenu()->GetLoginMngr(); R_ASSERT(lmngr); gamespy_gp::profile const * tmp_profile = lmngr->get_current_profile(); R_ASSERT2(tmp_profile, "need first to log in"); if (tmp_profile->online()) { if (!MainMenu()->ValidateCDKey()) return; if (!xr_strcmp(tmp_profile->unique_nick(), "@unregistered")) { if (m_connect_cb) m_connect_cb(ece_unique_nick_not_registred, "mp_gp_unique_nick_not_registred"); return; } if (!xr_strcmp(tmp_profile->unique_nick(), "@expired")) { if (m_connect_cb) m_connect_cb(ece_unique_nick_expired, "mp_gp_unique_nick_has_expired"); return; } } CUIListItemServer* item = smart_cast<CUIListItemServer*>(m_list[LST_SERVER].GetSelectedItem()); if(!item) return; if (!browser().CheckDirectConnection(item->GetInfo()->info.Index)) { Msg("! Direct connection to this server is not available -> its behind firewall"); return; } if (xr_strcmp(item->GetInfo()->info.version, MainMenu()->GetGSVer())) { MainMenu()->SetErrorDialog(CMainMenu::ErrDifferentVersion); return; } if (item->GetInfo()->info.icons.pass || item->GetInfo()->info.icons.user_pass) { m_message_box->m_pMessageBox->SetUserPasswordMode (item->GetInfo()->info.icons.user_pass); m_message_box->m_pMessageBox->SetPasswordMode (item->GetInfo()->info.icons.pass); m_message_box->ShowDialog(true); } else { xr_string command; item->CreateConsoleCommand(command, m_playerName.c_str(), "", "" ); Console->Execute(command.c_str()); } }
void PlayerAllocBonus::run() { vector<PlayerBonuses_t> bonuses = eng->playerBonusHandler->getBonusChoices(); if(bonuses.empty() == false) { const unsigned int NR_BONUSES_TOT = bonuses.size(); const unsigned int NR_BONUSES_COL_TWO = NR_BONUSES_TOT / 2; const unsigned int NR_BONUSES_COL_ONE = NR_BONUSES_TOT - NR_BONUSES_COL_TWO; vector<PlayerBonuses_t> bonusesColOne; vector<PlayerBonuses_t> bonusesColTwo; for(unsigned int i = 0; i < NR_BONUSES_TOT; i++) { const PlayerBonuses_t bonus = bonuses.at(i); if(i < NR_BONUSES_COL_ONE) { bonusesColOne.push_back(bonus); } else { bonusesColTwo.push_back(bonus); } } MenuBrowser browser(bonusesColOne.size(), bonusesColTwo.size()); draw(bonusesColOne, bonusesColTwo, browser); while(true) { const MenuAction_t action = eng->menuInputHandler->getAction(browser); switch(action) { case menuAction_browsed: { draw(bonusesColOne, bonusesColTwo, browser); } break; case menuAction_canceled: { } break; case menuAction_selected: { const coord browserPos = browser.getPos(); if(browserPos.x == 0) { eng->playerBonusHandler->pickBonus(bonusesColOne.at(browser.getPos().y)); } else { eng->playerBonusHandler->pickBonus(bonusesColTwo.at(browser.getPos().y)); } eng->log->clearLog(); eng->renderer->drawMapAndInterface(); return; } break; case menuAction_selectedWithShift: {} break; } } } }
void speechCallback( const speech_msgs::SpeechConstPtr& speech ) { cout << "speech callback" << endl; //1.開始 //2.okao内のトラッキングIDと結びついた名前(OKAO_ID)を調べる //3.もし、主人の名前があったら、4へ。なければ1へ(ループ) //4.speech内のトラッキングIDを取得 //5.トラッキングIDとOKAO_IDを照合する //6.OKAO_IDに発言を記録する //8.主人以外の人物の記録が終わったら、1へ。終わってなければ6へ。 //人物を検出しているかどうか // cout << "human size: "<< human_last.size() <<endl; if(human_last.size()) { bool master_is_looking = false; map<long long, int> tracking_to_okao; //発見した人物を記録し、主人を探す for(int i = 0; i<human_last.size(); ++i) { tracking_to_okao[ human_last[i].body.tracking_id ] = human_last[i].max_okao_id; cout << "now looking okao_id: " << human_last[i].max_okao_id << endl; if( human_last[i].max_okao_id == MASTER ) master_is_looking = true; } //主人がいるなら記録開始 // if( master_is_looking ) //{ speech_msgs::Speech sp_msg; float point_p = 0; cout<< "now looking master!" <<endl; int speech_okao_id; //string to long long long long speech_tracking_id = boost::lexical_cast< long long>(speech->TrackingID); cout << "now speech tracking_id: " << speech_tracking_id << endl; map< long long, int >::iterator tracking_id_find = tracking_to_okao.find( speech_tracking_id ); cout << "Now Speech Emotion:" << speech->emotion << endl; speech_okao_id = tracking_id_find->second; cout << "Now Speech Okao_ID:" << speech_okao_id << endl; speech_pub(speech,speech_okao_id); browser(speech,speech_okao_id); } }
boolean FileChooser::Accept() { boolean accepted, dirSelected; do { accepted = StringChooser::Accept(); dirSelected = browser()->IsADirectory(Choice()); } while (accepted && dirSelected); return accepted; }
//______________________________________________________________________________ Sguidoelement xml2guidovisitor::convert (const Sxmlelement& xml) { Sguidoelement gmn; if (xml) { tree_browser<xmlelement> browser(this); browser.browse(*xml); gmn = current(); } return gmn; }
void CServerList::RefreshList_internal() { m_need_refresh_fr = u32(-1); SaveCurItem (); m_list[LST_SERVER].Clear(); ClearSrvItems (); u32 NumServersFound = browser().GetServersCount(); g_gs_browser = m_GSBrowser; m_tmp_srv_lst.resize (NumServersFound); for (u32 i=0; i<NumServersFound; i++) m_tmp_srv_lst[i] = i; if (0 == xr_strcmp(m_sort_func, "server_name")) std::sort(m_tmp_srv_lst.begin(), m_tmp_srv_lst.end(), sort_by_ServerName); else if (0 == xr_strcmp(m_sort_func, "map")) std::sort(m_tmp_srv_lst.begin(), m_tmp_srv_lst.end(), sort_by_Map); else if (0 == xr_strcmp(m_sort_func, "game_type")) std::sort(m_tmp_srv_lst.begin(), m_tmp_srv_lst.end(), sort_by_GameType); else if (0 == xr_strcmp(m_sort_func, "player")) std::sort(m_tmp_srv_lst.begin(), m_tmp_srv_lst.end(), sort_by_Players); else if (0 == xr_strcmp(m_sort_func, "ping")) std::sort(m_tmp_srv_lst.begin(), m_tmp_srv_lst.end(), sort_by_Ping); else if (0 == xr_strcmp(m_sort_func, "version")) std::sort(m_tmp_srv_lst.begin(), m_tmp_srv_lst.end(), sort_by_Version); for (u32 i=0; i<NumServersFound; i++) { ServerInfo NewServerInfo; browser().GetServerInfoByIndex (&NewServerInfo, m_tmp_srv_lst[i]); AddServerToList (&NewServerInfo); } UpdateSizes(); RestoreCurItem(); };
//______________________________________________________________________________ void xml2guidovisitor::visitStart ( S_part& elt ) { partsummary ps; xml_tree_browser browser(&ps); browser.browse(*elt); smartlist<int>::ptr voices = ps.getVoices (); int targetStaff = 0xffff; // initialized to a value we'll unlikely encounter bool notesOnly = false; rational currentTimeSign (0,1); // browse the parts voice by voice: allows to describe voices that spans over several staves for (unsigned int i = 0; i < voices->size(); i++) { int targetVoice = (*voices)[i]; int mainstaff = ps.getMainStaff(targetVoice); if (targetStaff == mainstaff) { notesOnly = true; } else { notesOnly = false; targetStaff = mainstaff; fCurrentStaffIndex++; } Sguidoelement seq = guidoseq::create(); push (seq); Sguidoelement tag = guidotag::create("staff"); tag->add (guidoparam::create(fCurrentStaffIndex, false)); add (tag); flushHeader (fHeader); flushPartHeader (fPartHeaders[elt->getAttributeValue("id")]); xmlpart2guido pv(fGenerateComments, fGenerateStem, fGenerateBars); pv.generatePositions (fGeneratePositions); xml_tree_browser browser(&pv); pv.initialize(seq, targetStaff, fCurrentStaffIndex, targetVoice, notesOnly, currentTimeSign); browser.browse(*elt); pop(); currentTimeSign = pv.getTimeSign(); } }
int main(int argc, char * argv[]) { QApplication app(argc, argv); Q_INIT_RESOURCE(resource); MainWindow browser(QUrl("qrc:/index.html")); browser.show(); return app.exec(); }
int main(int argc, char *argv[]) { printf("Sample program started.\n"); Browser browser(); // Session session1 = browser1.tab("http://www.stroustrup.com/"); // printf("WWW: https://www.google.com/\n"); // printf("BROWSER ID: %d\n", session1.getBid()); // // session1.js("var img = window.document.querySelector(\"body > center:nth-child(4) > img\"); img.src = \"https://i.ytimg.com/vi/dcC26nnipxs/maxresdefault.jpg\"; img.height = 437; img.width = 700;"); // std::this_thread::sleep_for(std::chrono::milliseconds(2000)); }