Posts

Showing posts from February, 2010

angularjs - angular rewrite url in html5 mode -

now work in case write chrome extension in gmail, , our extension use ui-router change view, change url xxx/#inbox xxx/#/inbox, block extension features(streak) while customer expect use in same time. enable html5 mode, , rewrite url make work. here rewrite part: app.config(function($provide,$locationprovider,....){ $provide.decorator('$browser', function($delegate) { var superurl = $delegate.url; $delegate.url = function(url, replace) { if(url !== undefined) { return superurl(url.replace(/\%2f/g,"/"), replace); } else { return superurl().replace(/\//, "%2f"); } } return $delegate; }); $locationprovider.html5mode({ enabled: true, requirebase: false, rewritelinks: true }); ...... }) it works fine our part extension, while click streak feature, cause error l

javascript - Calling Ajax periodically -

i calling java script function view page (mvc razor) initiates ajax call. want periodically re-occur. reason going in recursive loop function getdata(url) { $.ajax({ url: url, type: "get", contenttype: "application/json; charset=utf-8", success: onsuccess, error: onerror, complete: function(xhr, status) { settimeout(getdata(url), 5000); } }); } function onsuccess(data, status, xhr) { (var key in data) { if (data.hasownproperty(key)) { var id = data[key].id; var value = data[key].value; document.getelementbyid(id).innerhtml = value; } } } on html page side call function on page load <script type="text/javascript"> getdata("someurl"); </script> any idea why going recursive when setting timeout in complete callback. settimeout(getdata(url), 5000); calls getdata function , inde

data structures - How to find the last element in the singly linked list? -

in singly linked list, know next of last node point null , can find out traversing. if last node of singly linked list point middle node how can find last node? if "last node" points other node, isn't last node, it? not mention stretch , possibly break commonly accepted definiton of "list". normally find last element node *current = list.start, *next = current.next; while (next != null) { current = next; next = current.next; } print("last node " + current->value); however, assumes "last node" point null. otherwise stuck in infinite loop. it's practice keep pointer last node of list first, that's trivial solution doesn't depend on last node pointing null.

ios - Trigger a push notification from inside the app -

is possible trigger push notification inside app itself? i need build function compares remote file cached file , if there new content on remote file updates cache , triggers push notification app itself. i wondering if possible? , if how go building it? note: cached file in json format. to make possible, have permanently check updates, drain user's battery , consume networking capacity , setting server realise task way go here. it this: send device's push token server , subscribe changes file. trigger action on server, when remote file changes. send notification devices subscribed file using push token got in step 1. to learn more how push notifications work, can have onto great tutorial here .

node.js - Send variables to all routes in exressjs -

using nodejs/expressjs build apis web app, want send variables apis, such site title , description , on. i stumbled upon old solution using dynamichelper() no longer in use. new approach so? easiest thing put in middleware attaches response object locals (those show in views automatically). like: app.use(function(req,res,next) { res.locals = { title : 'your title', description : 'your description' }; return next(); }); ** edit account api endpoints have since each endpoint responsible own object, like: app.get('/whatever', function(req,res){ var json = {}; // whatever build json json.metadata = res.locals; // or whatever common stuff res.send(json); } this keeps 'common' stuff in 1 part of json response.

dataframe - Reading in Data.Frames with Strings as factors = False in R using chain operator -

i have table source reads data frame. know default, external sources read data frames factors. i'd apply stringsasfactors=false in data frame call below, throws error when this. can still use chaining , turn stringsasfactors=false ? library(rvest) pvbdata <- read_html(pvburl) pvbdf <- pvbdata %>% html_nodes(xpath = `//*[@id="ajax_result_table"]`) %>% html_table() %>% data.frame() data.frame(,stringsasfactors=false) <- throws error i know simple, i'm having trouble finding way make work. thank help. though statement should logically data.frame(stringsasfactors=false) if applying chaining, statement doesn't produce required output. the reason misunderstanding of use of stringsasfactors option. option works if make data.frame column column. example: a <- data.frame(x = c('a','b'),y=c(1,2),stringsasfactors = t) str(a) 'data.frame': 2 obs. of 2 variables: $ x: factor w/ 2 levels "a&q

asp.net web api - Timer event in web api -

i have created timer event try running in background of web api, found works fine when debugger on local dev machine. however, timer not work when added them iis on server. stops after first web request finishes( tested writing text log files, seems stopped after few triggers, once web request completed) here example code. void refreshtimestart() { refreshtimer = new system.timers.timer(convert.toint32(configurationmanager.appsettings["timer_interval"])); refreshtimer.elapsed += new elapsedeventhandler(connectionresetevent); refreshtimer.autoreset = true; refreshtimer.enabled = true; } void connectionresetevent(object source, elapsedeventargs e) { testindex = testindex + 1; writetofile(testindex); } static void writetofile(int i) { string text = "this start trigged. "; system.io.file.writealltext(@"c:\projects\abc" + i.tostring() + ".txt", text

Ignore Callbacks (beforeFind, beforeSave etc) in CakePHP 3.x -

in cakephp 2.x have find('all','callbacks'=>false) equivalent alternative in cakephp3? i have situation in beforefind callback (in model's behavior) i'm appending site_id every query (for multi-tenant app). 90% of time want query appended via beforefind, %10 of time want finds ignore callbacks. i've looked at: cakephp 3: how ignore beforefind specific queries? comes close, applying method won't 'chain' ignored beforefind() callback on associated models, need do. updated code: i've got 2 tables 'sites' , 'details' sites hasone details, details belongs sites. inner join. in appcontroller's initialize() function i've got $tbl = tableregistry::get( 'sites' ); $options = [ 'conditions' => ['sites.domain' => 'three.dev.mac', 'sites.is_current' => 1, 'sites.is_archive' => 0], 'cont

loops - Marie simulator looping when not meant to after storing inputs -

i have written basic marie code multiplying 2 numbers, x , y. built without first 6 lines , assign x , y decimals test program realized need allow user input numbers. when step through or run it asks input, stores x, asks input, stores y , goes asking input, ie. input x. , infinitely..... what? multiply_subroutine, dec 0 input store x input store y multiply, dec 0 load y skipcond 800 jump end load temp add x store temp load y subt 1 store y skipcond 400 jump multiply load temp store x output x end, halt x, dec 0 temp, dec 0 y, dec 0 null, dec 0 one, dec 1 it because multiply subroutine line name/variable has operand 0 when line 8, needs dec 8 work :)

ruby on rails - why it keep saying undefined method -

problem undefined method"title" #category but knows parameters: {"id"=>"1"} this cloth.rb class cloth < activerecord::base belongs_to :category end this category.rb class category < activerecord::base has_many :cloth end this category.html.erb problem @ line 16 = <%=@categories.title%> <div class="col-md-9"> <div class="dreamcrub"> <ul class="breadcrumbs"> <li class="home"> <a href="index.html" title="go home page">home</a>&nbsp; <span>&gt;</span> </li> <li class="home">&nbsp; apparel&nbsp; <span>&gt;</span>&nbsp; </li> <li> <%=@categories.ti

javascript - Why do div get scrolled when input is selected in tizen? -

i have tizen web application has multiple input field. when user clicks on input div scrolls bottom , input drawers comes up. user can't see input field. how prevent this? i tried using this: $('input').bind('focusin focus', function(e){ e.preventdefault(); }); it doesn't work. edit: here sample part: <div class="ui-page" id=""> <div class="ui-header"> <h1 class="ui-title">header</h1> </div> <div class="ui-content" id="history"> <ul data-role="listview"> <li><span>input 1:</span> </li> <li> <input type="tel" id="input1" style="background-color: #d1d1d1;"> </li> <li><span>input 2:</span> </li> <li>

node.js - How does node event loop decide when to switch flows? -

i use nodejs on rasbperry pi control hardware pins. assuming code such as: for (..) { executeasynccode(..) } function executeasynccode() { doasync1().then(doasync2()).then(doasync3())... } will executed in such manner each execution of executeasynccode separated others, meaning 2 asynchronous executions wont running @ same time. real-time verification , usage shows differently. encounter executions doasync1(..) called 1 after other 2 executions of executeasynccode function, , doing lot of mess during that. to usage problem, hardware cant used in parallel, , there many cases might want execute code , rely on fact no locks required. how can such code limited not execute together? there way of knowing how event loop execute code? all code finish executing before event loop start next context. means loop execute completion before async callbacks executed. example: for ( var = 0; < 100000; i++ ) { console.log( 'hi!' ); settimeout( function ( )

model view controller - Haxe NME UI: Best practices for MVC application design -

yesterday stumbled across haxe nme project, promising idea. however, still not possible build sophisticated uis framework. in opinion seems intimidating task build ui framework targets many different platforms, hence think isn't viable approach, because old , mature ui frameworks qt , wxwidgets don't support many platforms. however, make sense build platform specific ui of pretty ui designer tool , connect ui code ui agnostic code has been written in haxe. don't know if work, because couldn't find example, maybe has written mvc haxe code, connected different platform specific uis, share experiences. thanks. you say: however, still not possible build sophisticated uis just because haven't yet figured out how doesn't mean it's not possible ;) the reason possible in haxe ecosystem, language , compiler extremely consistent cross platform, nme/openfl provides strong cross platform rendering environment (html 5 has quirks, others seem stro

visual studio - SSRS - Space / Margin between header and tablix in content area on subsequent page -

Image
okay, know question hard digest. so hope attached picture make more sense of question. basically want maintain space between header , tablix after first page. i use bottom border header , user don't want see table , header glued together. tried put empty textbox (hidden) not working can't repeat textbox on subsequent page. it looks though have gap between top of report body section , top of tablix - lead gap on first page, not repeated on subsequent pages. if move tablix there no gap between , top of report body section, should resolve problem.

Tabular Model: DISTINCTCOUNT on field with blanks in DAX -

i understanding distinctcount function in dax supposed ignore blanks. i'd expect if had 2 unique values , blank in column distinctcount on column return 2. i find continues return 3 i.e. blank treated value. how can change this? i cannot find anywhere in tabular model can change equivalent of nullprocessing. have tried creating column blank() , returns count of 1 i'd expect 0. all appreciated. i got answer. using following dax numeric fields calculate(distinctcount('sales'[someid]), 'sales'[someid] <> 0) or calculate(distinctcount('sales'[someid]), 'sales'[someid] <> "") for character fields.

.htaccess - Rewrite unsecured subdomain to secured -

i know has been answered, in post htaccess redirect https secure.domain.com, non https www.domain.com but can't work. have 2 ip addresses. 1 points @ main domain, domain.com not secured. second points @ subdomain.domain.com secured. need subdomain.domain.com rewritten https://subdomain.domain.com . if has more information thankful. .htaccess code using no success- #non-secure requests subdomain.domain.com should redirect https://secure.domain.com rewritecond %{https} off rewritecond %{http_host} ^subdomain\.domain\.com$ [nc] rewriterule .* https://%{http_host}%{request_uri} [l,r=301] did turn on rewriteengine? options +followsymlinks rewriteengine on make sure these 2 lines above line in post.

java - Typecasting methods with "instanceof" -

so i'm running problems setting methods, i've been staring @ computer screen long. i'm having difficulty 4 of 5 methods. last 2 methods need call compscistudent class, hence use of 'instanceof' because not students in array compscistudents. 2 methods need add cs language student in student array, , other 1 check see how many compscistudents in array know specific language. other 2 methods deal whole array. first 1 add test score specific student in position, each student in array have specific name when called in array. last method getting average average test score. method call average test score both students , compscistudents in array , average each separately take average of averages. take @ class structure: public class school { private student[] thestudents; public school() { this.thestudents = new student[] { null };// needs start out empty } /* * next 2 methods allow user add or drop student * student array school ?

reporting services - Creating SSRS report using C# code behind -

i creating ssrs report using code behind c# not tool. want add rd:userdefined true tag query parameter using c# code behind. how can add tag code dataset giving xml error. my code add queryparameter : xmlelement queryparameters; xmlelement queryparameter; queryparameters = addelement(query, "queryparameters", null); queryparameter = addelement(queryparameters, "queryparameter", null); addattribute(queryparameter, doc, "name", "@reportid"); addelement(queryparameter, "value", _objdynamicprocedureparameters.reportid); addelement(queryparameter, "rd:userdefined", "true"); i want add queryparameter should shown on reportviewer filter. i have resolved this. added reportparameters tag add report parameters : reportparameter = addelement(reportparameters, "reportparameter", null); addattribute(reportparameter, doc, "name", "rolename&quo

php - Mailing code giving an error -

this question has answer here: php parse/syntax errors; , how solve them? 12 answers i new php & have tried out code in php sending mail user simple means, facing issues code giving error..!! please me. php $to = ' '". $_session['email'] ."' '; $subject = 'your vault number'; $message = 'your vault number '". $_session['vault_no'] ."' '; $headers = 'from: innovation@miisky.com' . "\r\n" . 'reply-to: innovation@miisky.com' . "\r\n" . 'x-mailer: php/' . phpversion(); mail($to, $subject, $message, $headers); you have syntax error in string assignment: $to = ' '". $_session['email'] ."' '; ^ here ^ , here yo

javascript - loadhtml instead of loadUrl in electron scripts and links are not working -

i same thing in question , give data template, compile , made file var file = 'data:text/html,' + encodeuricomponent(compiled); all looks fine, template rendered , data, tags in head stop working, tags link or script src attribute here doc in pouchdb id maz-63171 , give doc template: db.get('maz-63171') .then(function(doc) { var compilefn = pug.compilefile('./pugtemplates/index.pug', { pretty: true }); var compiled = compilefn({doc: doc}); console.log(compiled); // console.log(doc); // 'file://' + __dirname + '/pugtemplates/index.pug' var file = 'data:text/html,' + encodeuricomponent(compiled); mainwindow.loadurl(file); }) .catch(function(err) { console.log(err); }); in index.pug have this doctype html html(lang="en") head title="trucks" link(rel="stylesheet" href="../node_module

wcf - Can i use System.Runtime.Caching.MemoryCache in cloud web role project? -

i use system.runtime.caching.memorycache in web role project contains wcf service . can please let me know whether can use system.runtime.caching.memorycache in cloud web role project? if yes please let me know memory , other constraints. yes can. you should add reference system.runtime.caching web role project, use code below (it doing nothing , not best practice, sure). just tried asp.net mvc in cloud web role azure emulator , works. regarding limits - there 2 cachememorylimit , physicalmemorylimit properties can use retrieve needed values. shows limit in bytes. not know if there limits beyond these in terms of in-memory cache in azure cloud services. private static object _lock = new object(); private static memorycache _cache = new memorycache("thisismycache"); public static object getitem(string key) { lock (_lock) { var item = _cache.get(key); if (item == null) {

asp.net - Implementing 3-tier Architecture in MVC3 -

i want create simple application user can register himself credentials first name,last name , on..after clicking on register button bring him on mail authentication of user have link , clicking on link redirect login page.i want implement using 3-tier architecture in mvc3.i have created project choosing mvc template , named presentation , bll , dal should do? have created model: public class register { public int id { get; set; } public string first_name { get; set; } public string last_name { get; set; } public string email_address { get; set; } public bool accept_term { get; set; } public bool male { get; set; } public bool female { get; set;} public string current_location { get; set; } } create class library bll , class library dal , reference bll in mvc project , reference dal in bll project. mvc project make calls bll , in turn call dal data storage/retrieval. bll can passthrough in

Android display Timeout Message in Web Service when connection or read timeout while internet connected -

hi need display message "data not received" on connection or read timeout. i implement using java.net.sockettimeoutexception can't message if there no data received while internet connected. i through internet connected or not. but want when internet connected. internet connectivity test code public static boolean isnetworkconnected(activity activity) { connectivitymanager connectivity = (connectivitymanager) activity.getsystemservice(context.connectivity_service); if (connectivity != null) { networkinfo[] info = connectivity.getallnetworkinfo(); if (info != null) (int = 0; < info.length; i++) if (info[i].getstate() == networkinfo.state.connected) { return true; } } return false; } code @override protected string doinbackground(string... params) { // todo auto-generated method stub string result = ""; try { url

Can't initialize static member in Java - Android -

i've helper class named prefs in i've static class member of interface syncfinishedlistener . here's are: public interface syncfinishedlistener { void onsyncfinished(); } here's prefs helper class public class prefs { public static final string tag = prefs.class.getsimplename(); private static final string prefsname = prefs.class.getsimplename(); sharedpreferences mprefs; public prefs(context context) { super(); mprefs = context.getsharedpreferences(prefsname, context.mode_private); } private static syncfinishedlistener listener; public prefs(context context, syncfinishedlistener listener) { this(context); prefs.listener = listener; syncutils.get(context).requestsync(hremployee.authority); } private boolean issyncfinished() { boolean issyncfinished = (ishremployeesyncfinished() && ishrattendancesyncfinished() && isat

java - One or multiple databases SQLite in Android? -

i'm coding app in android use lot of databases in sqlite next schema: public class dbuser extends sqliteopenhelper { private static final int version_database = 1; //name of database. private static final string name_database = "nameofdb.db"; //the creation of table in sql. private static final string table_database = "create table example " + "(id int)"; private static final string table_database2 = "create table example2 " + "(id int)"; // more tables... //constructor. public dbuser(context context) { super(context, name_database, null, version_database); } @override public void oncreate(sqlitedatabase db) { db.execsql(table_database); db.execsql(table_database2); //... } @override public void onupgrade(sqlitedatabase db, int oldversion, int newversion) { db.execsql("drop table if exists " + table_database); oncreate(db); } /****now methods****/ } i've, more or

jquery ui - Double Click on from date change the to date also in Date range datepicker -

when double click on date in date range datepicker,the date date getting changed well. $(function() { $( "#from" ).datepicker({ onclose: function( selecteddate ) { $( "#to" ).datepicker( "option", "mindate", selecteddate ); } }); $( "#to" ).datepicker({ onclose: function( selecteddate ) { $( "#from" ).datepicker( "option", "maxdate", selecteddate ); } }); }); here jsfiddle: jsfiddle it's bug: https://bugs.jqueryui.com/ticket/8907#no1 what happens calling method on datepicker 2 while datepicker 1 open causes datepicker 2 rendered in place of datepicker 1. can see happening selecting date in different month datepicker 2, selecting date in datepicker 1; you'll see month switch datepicker closing. but if use timeout, things right! see on jsfiddle. settimeout(function(){ $( "#to" ).datepicker( &qu

amazon web services - Cant deploy using meteor mup to aws ec2 Error: Try reinstalling node-fibers -

i cant deploy aws using mup in meteor. manage setup success cant deploy. got error: try reinstalling node-fibers . node version v.0.10.40. have set deploycheckwaittime long 300 , still doesnt work. mup.json { "servers": [ { "host": "xx.xxx.xxx.xx", "username": "ubuntu", "pem": "web.pem" } ], "setupmongo": true, "setupnode": true, "nodeversion": "0.10.40", "setupphantom": true, "enableuploadprogressbar": true, "appname": "webapp", "app": "../webapp", "env": { "port": 80, "root_url": "ec2-xx-xxx-xxx-xx.us-west-2.compute.amazonaws.com", "mongo_url": "mongodb://localhost:27017/webapp" }, "deploycheckwaittime": 60 } this mup logs error: /opt/webapp/app/programs/server/node_m

java - How to avoid intermittent empty lines when using FileOutputStream with append = false? -

the following code leaves random.txt file no content: final random rand = new random(); while (true) { try (fileoutputstream fos = new fileoutputstream("random.txt", false); printwriter pw = new printwriter(fos, true)) { pw.println(rand.nextlong()); } catch (ioexception ioe) { ioe.printstacktrace(); } } this can verified using tail : $ tail -f random.txt 511109499422519327 -4120669548002912852 -6691981558077108749 -3630360891256027458 2917713483009724854 -5999569794311404435 -7616466037397807657 6997723694593334477 -7350203015863330163 1355067773463270538 -8140835511024500423 -2536681669468724500 -2926317178660145957 -6983787629710676243 7119127016459332336 7186294589323134873 -8389505833590104437 197327637272321424 -1458700265861408851 5685819798785563231 4060059342974359248 215297222019419003 2913123181036087590 -5940005294121482941 5658270253202816998 as can see, there 2 gaps in tail 's output. happens because fileou

xml - XSLT Formatting number gives wrong thousand an grouping separator -

i have xslt page, needs become regional aware. pass thousand , decimal separator session parameters page. put them in xsl:decimal-format , try call on amount fields. <xsl:param name="usernumberformat"/> <xsl:param name="userthousandseparator"/> <xsl:param name="userdecimalseparator"/> <xsl:decimal-format nan="" decimal-separator="$userdecimalseparator" grouping-separator="$userthousandseparator" name="userformat"/> ... <xsl:value-of select="format-number(number(payment:instructedamount/system:amount), '#,###.00', 'userformat')"/> but have problem when deploy, characters wrong formatted. for example instructed amount field gets following input: 0.12 my thousand separator comma , decimal separator dot. but gives output: 00,. i tested session variables $userdecimalseparator , $userthousandseparator printing them out on page

How many POSIX shared memory blocks/handles is feasible on Linux? -

i want split shared memory in reasonable pieces, have no idea, number good? 100 shared memory handles 1 application reasonable number? p.s: have produces/consumer problem. producer writes data in shared memory, 1 or many consumers read data time-shifted. producer , consumers should never access same data-block. consumers may try access , modify same memory-blocks. consumer access should managed semaphores. the single data-block ca. 30kb , entire shared memory 1gb. using ca 100 pieces sure prevent locking producer/consumer , minimize number of locks required among consumers.

eclipse - Android App: Add Tablet and Smartphone Version in Google Play with <supports-screens> -

i want add tablet , smartphone version. how can in google play? do have set tablet app android:xlargescreens="true" android:largescreens="true" android:normalscreens="false" android:smallscreens="false" and smartphone app to: android:xlargescreens="false" android:largescreens="false" android:normalscreens="true" android:smallscreens="true" and android:resizeable="true" android:anydensity="true" mean? i´ve read developer site informations, don't pls me! thanks pls ref [use compatible screen][1] manifest app targeting phones should have: <compatible-screens> <!-- small size screens --> <screen android:screensize="small" android:screendensity="ldpi" /> <screen android:screensize="small" android:screendensity="mdpi" /> <screen android:screensize="small" android:screendens

Insert date into SQL Server database through vb.net -

dim salesinsert new sqlcommand("insert tbl_sales (sale_id, transaction_no, customer_id, item_id, amount, date) values(" _ & salesidmax + 1 & "," & transaction_label.text & "," & 1 & "," & label4.text & "," & textbox1.text & _ "," & datetimepicker1.value.date & ")", sqlcon) sqlcon.open() salesinsert.executenonquery() sqlcon.close() salesinsert = nothing i have code. works fine, problem date. reason inserts same date every time: "1/1/1900". when debugged code see sql command text fine , date fine , executed in sql query , fine. but in vb doesn't. i not know why not working. please can have suggestions fix it. if use parameterized queries avoid problems representing dates strings. you can use sql parameters (i had guess @ database column data types) query thi

shell - How do I batch copy and rename files with same name in different path? -

i have set of folders, inside each folder have several sub-folders. in each sub folder there file called result.txt need result.txt copied other location renaming result files. folders: abc1 efg1 doc2 ghih sub-folders: in aaa1 1.abc1.merged 2.abc1.merged 3.abc1.merged 4.abc1.merged in efg1 1.efg1.merged 2.efg1.merged 3.efg1.merged 4.efg1.merged 5.efg1.merged ... ... so on of sub-folders contain result.txt in single different folder result files renamed result1.txt,result2.txt etc. i tried set name of sub-folder variable in shell script , made loop go in sub-folder , copy result.txt other path , rename mv command.but result.txt file 1 subdirectory each copied not all. i tried following commands: cp $folder/$subfolder/resu*txt ../tsv/$newfolder/ (i assigned variables) mv ../tsv/$newfolder/resu*txt ../tsv/$newfolder/results$tts.txt (i defined $tts number of subfolders in folder) this copied result.txt first sub-folder in each of parent folders.

How do you configure NGINX so that it handles 50x errors from upstream server B that upstream server A cannot? -

i have started learning nginx , encountered problems. still getting , error 500, if have configured nginx (1.4.6) error_page directive. config works ( woops.html expected ) if try not send error 500 second upstream server. here's configuration file: server { listen 80 default_server; root /srv/www; index index.html index.htm; server_name test.dev; location / { proxy_pass http://localhost:8080; proxy_intercept_errors on; error_page 500 @retry; } location @retry { proxy_pass http://localhost:8081; proxy_intercept_errors on; error_page 500 /woops.html; } location = /woops.html { root /srv/www; } } server { listen 8080; listen localhost:8080; server_name localhost; root /srv/www; location / { return 500; } } server { listen 8081; listen localhost:8081; server_name localhost; root /srv/www/app;

popup - Windows 10 : naming programs main.exe cause them to show pop up -

Image
on windows 10 when create program named main.exe or rename program main.exe , program show pop seen here : there 2 different pop can shown : -the game bar 1 (french , english version): -the screenshot 1 : (in english: press win + alt + printscreen take screenshot) i discovered problem while using python , cx_freeze, i have tested on multiple programs, including (as seen above) renaming notepad++.exe main.exe , , each time, 1 of pop there, we can note pop appears alternatively (one game pop up, 1 sreenshot pop up, 1 game pop up...) i run windows10 via virtual box, described below, problem happend on physical machines. any idea on how happend? note : boltclock tested (on physical machine) , found that, on machine behavior happening "main.exe" while, on machine behavior happened whatever may uppercase/lowercase distribution of "main" (ie: works main.exe,main.exe or main.exe) i've done digging on weekend , have f

android - my app crashes after downloading it in the play store -

i upload app on play store, apk works fine when export eclipse , install on phone when download play store, app starts, when enter in 1 of activitys, crash, knows why happen? this xml file <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".mainactivity" > <imageview android:id="@+id/imageview1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentleft="true" android:layout_alignparenttop="true" android:src="@drawable/maths" android:background="@android:color/white" /> <button android:id="@+id/button2" android:layout_width=&q

c# - How to display multiple real time data obtained from the sensor through serial port in different text box? -

i using dht11 sensors in arduino mega 2560. there 2 types of data want collect, humidity , temperature. next, wish display these 2 data different text boxes of gui c#. far able display data same text box. coding use c# my arduino coding. 2 floats; h , t wish split it i don't know answer question, believe you'd more if posting @ https://arduino.stackexchange.com/

javascript - jQuery multi level selector for hover event -

i have multi level menu structured this: <div id="outer_div"> <div id="menu_liv0" class="menu"> <ul> <li><a href="#" data-id="125" data-liv="0">text</a></li> <li><a href="#" data-id="184" data-liv="0">text</a></li> <li><a href="#" data-id="240" data-liv="0">text</a></li> </ul> </div> <div id="menu_liv1" class="menu"> <ul> <li><a href="#" data-id="430" data-liv="1">text</a></li> <li><a href="#" data-id="307" data-liv="1">text</a></li> <li><a href="#" data-id="652" data-liv="1"

algorithm - Reading Lines after a line in C++ not working -

i've spent 2 hours trying parse following bytes file : >rosalind_6404 cctgcggaagatcggcactagaatagccagaaccgtttctctgaggcttccggccttccc tcccactaataattctgagg >rosalind_5959 ccatcggtagcgcatccttagtccaattaagtccctatccaggcgctccgccgaaggtct atatccatttgtcagcagacacgc >rosalind_0808 ccaccctcgtggtatggctaggcattcaggaaccggagaacgcttcagaccagcccggac tgggaacctgcgggcagtaggtggaat i store word rosalind_, , store every line, concatenate all, , have 1 string having lines. i tried following code, still doesn't work probably, miss last line. int main() { std::ifstream infile("data_set.txt"); map < int, string > id; map < int, string > datasetmap; int idnumber= 0; int iddatasetnumber = 0; std::string line; std::vector<string> datasetstring; std::string seqid; while (!infile.eof() ) { while(std::getline(infile, line)) { if ( line.substr(0,1)== ">") {