Posts

Showing posts from April, 2010

file - Why is seekp not doing its job? C++/CLI -

my function "writetofile" writing piece of data file @ end of line indicated int variable zone. file set @ beginning text indicate put data, seekp() doesn't seem placing output marker need go. can point out i'm missing please? this file creation in main function: string myfilename = txtboxcont; myfilename.append(".txt"); myfilename="test.txt"; //temporary name, delete before publish <<. ofstream prefile(myfilename, ios::trunc); int i; (i=1;i<=4;i++) prefile << "dc" << << "\n"; prefile << "junk:"; prefile.flush(); prefile.close(); fstream myfile(myfilename,ios::in | ios::out | ios::ate); if (!myfile.is_open()) throw; and writetofile function: (fyi: data "0.95" or "623") void writetofile(fstream &myfile, string& data, int zone) { data = numbercheck(data); //filters out non-numeric data, returns "null" if nothing left.

email - GnuPG: Plugin for Outlook that allows searching through encrypted mails -

i have tested gpg4win plugin outlook. when use cannot use outlook search body text in email. i imagine due email being encrypted , outlook searches through encrypted email , not decrypted email. my threat model protect email transfer. email hits our mailserver consider safe store decrypted. imagine solution gpg4win decrypt email using passphrase , store decrypted version on system , local cache, can searched ordinary email. is there way can search through encrypted emails using outlook? ole, should give gp4o try. gpg4o if want can save mail after decryption, can processed indexer. additionally easiest pgp plugin have discovered best regards karl

c# - System.Array does not support Add(), so how does collection initializer work? -

in c# can initialize array so: var example = new int[] { 1, 4, 3 }; as quoted in custom collection initializers : the collection object collection initializer applied must of type implements system.collections.ienumerable or compile-time error occurs. each specified element in order, collection initializer invokes add method on target object expression list of element initializer argument list, applying normal overload resolution each invocation. thus, collection object must contain applicable add method each element initializer. but cannot add system.array, 1 has create new larger array each added item, not performance. how c# work when using collection initializer on array? wonder if write class internal array supports collection initializer. array isn't custom collection. it's array. array initializers pre-date collection initializers, , inspired syntax .

Swift ERROR- [__NSCFData gotoShowChannel11] When i create button in Delegate and add view on tabbar -

i gating problem in ios 8 code working in ios 9 . have create 1 transparent button , add subview in tabbar method. problem button event not working when tabar load second time , problem in ios 8 , working in iso 9. here code delegate var button_oftabbar = uibutton(); //var button_oftabbar:uibutton!; //uibutton();= uibutton(type: uibuttontype.system) in tabbar class tabbar: uitabbarcontroller,uitabbarcontrollerdelegate { //let button_oftabbar = uibutton(); var delegate1: appdelegate! let adatabase : databaseinit = databaseinit() override func viewdidload() { super.viewdidload() uitabbar.appearance().tintcolor = uicolor(red: 242/255.0, green: 134/255.0, blue: 55/255.0, alpha: 1.0) self.delegate=self; delegate1 = uiapplication.sharedapplication().delegate as! appdelegate uitabbar.appearance().bartintcolor = uicolor.whitecolor() if(delegate1.tag_jive_channel_tab == 0) {

mysql - django sql thread safe? -

assume have code: product = product.objects.get(name='something') product.number_sold += 1 product.save() if during query number_sold 10, , before save(), code run @ same time query return 10 again, means save number_sold = 11 twice ? in other words, can 2 users running django view can same value number_sold field ? to avoid race condition in multi-thread/process code should use f()-expressions : from django.db.models import f product = product.objects.get(name='something') product.number_sold = f('number_sold') + 1 product.save()

android - How can we make a generic UI in phonegap for all platforms? -

i have been working on cross platform project. beginner phonegap. problem have re-skinned cross platform application. re-skinned whole application using inline css. when run application on different devices ui of application displays differently each device. how can convert generic ui? have looked @ this framework? it mimics natural ui depending on phone using.

android - drawer not covering actionbar -

i want open drawer such covers actionbar. tried using parent linear layout , inside defined toolbar , drawerlayout , working fine thing cant see menu item there.. can open drawer swiping left right on screen. if define toolbar outside of linear layout menu showing actionbar not covered drawer. how achieve both of them simultaneously? here xml file of activity_main <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" xmlns:tools="http://schemas.android.com/tools" android:background="@color/white" android:fitssystemwindows="true" android:layout_height="match_parent" android:orientation="vertical" tools:context="variofitness.com.schedulekeeper.homeactivity"> <include android:id="@+id/toolbar_actionbar"

jquery - Formatting CSV values from a file in Javascript to populate Google Chart -

i have csv file values date value1 value2 . want populate google charts data. using jquery-csv.js , i'm reading values. <script type="text/javascript" src="js/jquery.csv.js"></script> <script type="text/javascript"> // load visualization api , piechart package. google.load('visualization', '1.0', {'packages':['corechart']}); // set callback run when google visualization api loaded. google.setonloadcallback(drawchart); // callback creates , populates data table, // instantiates pie chart, passes in data , // draws it. function drawchart() { $.get("data.csv", function(csvstring) { // transform csv string 2-dimensional array var arraydata = $.csv.toarrays(csvstring, {onparsevalue: $.csv.hooks.casttoscalar}); //alert(arraydata); // new datatable object holds data var data = new google.visualization.arraytodatatable(arraydata); alert(data.g

sqlite query not working android -

these methods of spinners mspinnermodel.setonitemselectedlistener(new adapterview.onitemselectedlistener() { @override public void onitemselected(adapterview<?> parent, view view, int position, long id) { selectedmodel = parent.getitematposition(position).tostring(); toast.maketext(parent.getcontext(), "selected model: " + selectedmodel, toast.length_long).show(); string sp1 = string.valueof(mspinnermodel.getselecteditem()); if (sp1.contentequals("college1")) { list<string> list = new arraylist<string>(); list.add("maharani university "); //list.add("manipal "); // list.add("itm university "); // list.add("university1"); // list.add("maharan

f# - FAKE: CreateCSharpAssemblyInfo has difficulties with German umlauts -

when i'm using german umlauts in values attributes converted garbage. target "assemblyinfo" (fun _ -> createcsharpassemblyinfo "./src/app1/properties/assemblyinfo.cs" [ attribute.title "app1" attribute.product "some umlauts: äüö" ] ) when build completed find in assemblyinfo.cs: [assembly: assemblyproductattribute("some umlauts: ���")] how can avoid this? i have solved problem replacing umlaut characters there corresponding unicode codes: attribute.product "some umlauts: \u00e4\u00fc\u00f6" update using unicode characters works real cause encoding problem. after changing encoding of build script utf-8 umlauts translated correctly. (thanks @carsten , @mthierba)

multithreading - C# keep event handling thread alive in CPU friendly way -

i run 10 threads in parallel. each thread contains code handles serial port communication (using 'serialport' class). of features are: code handling event raised when rs232 device returns data. code handling timer events raised when rs232 device not return data within predefined time frame. as can see each thread handles asynchronous events initialized , started thread itself. thread needs keep alive until events have been raised , processed. based on received data rs232 device thread knows when work done , thread can kill itself. now question: avoid using infinite loop keep thread alive avoid using lot of cpu resources on nothing. idea how , avoiding thread blocks/stops itself?. the efficient way keep 10 threads idle based on condition use waithandle. the manualresetevent class allows signal when want continue execution. can signal multiple threads same handle. class work { public static void workmethod(object stateinfo) { console.wri

php - How to copy a file from a website to amazon bucket using zend service amazon? -

i need copy resource website s3-bucket. example image ' http://upload.wikimedia.org/wikipedia/commons/6/63/wikipedia-logo.png ' need copy folder in s3-bucket. possible using zend_service_amazon? you have use stream wrappers. haven't dealt image files hope work . $s3 = new zend_service_amazon_s3($my_aws_key, $my_aws_secret_key); $s5="s".rand(); $s3->registerstreamwrapper($s5); //$bucketname- bucket name mkdir($s5."://".$bucketname); //$path - want store file including bucketname $s1=$s5."://".$path; $filedata = file_get_contents('yourimage url'); file_put_contents($s1, $fildata);

WPF ListBox: Vertical scrollbar and focus -

i have 2 problems regarding listbox/wrappanel. first of all, setup: in xaml have listbox. inside of listbox wrappanel. programatically add listboxitems wrappanel. problem one the listboxitems [stackpanel image , textblock] fills left right , down. however, vertical scrollbar not appear if there more listboxitems there space in listbox. following xaml code makes vertical scrollbar visible. however, remains disabled: <listbox name="li1standortlinks" background="transparent" maxheight="300" scrollviewer.verticalscrollbarvisibility="visible"> <wrappanel name="wp1standortlinks" itemheight="80" itemwidth="150" width="755" /> </listbox> how functional vertical scrollbar when needed? problem two when clicking listbox not @ listboxitem [for example, in between 2 of them], background of whole listbox gets highlighted in blue. background transparent , should remain if listbox cl

php - If Statement Inside a Function Not working -

similar questions have been posted have not been able find answer. this if statement works correctly it's self. $subject_id_top = "case studies"; if($subject_id_top == "case studies") {echo "active";} but when inserted if statement inside function not work. <style> .active { color:#f00; } </style> <?php $subject_id_top = "case studies"; function menu_active() { if($subject_id_top == "case studies") {echo "active";} } <a class="<?php menu_active(); ?>" href="#">case studies</a> ?> this seems basic issue life of me havent been able figure out. community great. in advance. because $subject_id_top inside function refers $subject_id_top outside scope of function ( the global scope ), have 'import' it, speak, statement: global $subject_id_top; you're function should become: function menu_active() { global $subject_id_

mysql - How to retrieve multiple rows with the same ID from two tables with only knowing one value -

i sitting @ problem currently. have imported open source geolocation database. i have 2 tables want access to. table a: id   | lat | lon 200 | 48 | 12 table b: id   | type | value 200 | city   | munich 200 | state | bavaria want have result this: id   | lat | lon | typevalue | typevalue 200 | 48 | 12  | munich        | bavaria is possible in 1 query? edit: value know "munich" edit2: i've got far: select geodb_coordinates.lat lat, geodb_coordinates.lon lon, geodb_textdata.text_val text geodb_coordinates, geodb_textdata geodb_coordinates.loc_id = geodb_textdata.loc_id , geodb_textdata.text_val :location group geodb_textdata.text_val order length(geodb_textdata.text_val) limit 3 try like: select a.id,a.iat, a.ion, b.value typevalue1, c.value typevalue2 inner join b on a.id=b.id , b.type='city' inner join b c on b.id=c.id , c.type='state'

c++ - recursive variadic template function call "loses" pointer on second argument type -

i've got function (getarg s ) using variadic template sorts through it's arguments (each pointer), sending each function (getarg) has been overloaded each type (at moment int & float). overloaded funtions each type set value @ pointer. it compiles fine, , when call function many arguments of single type runs fine. if use 2 types (float & int), run fine until first occurrence of second type, crashing because (from can tell) pointer address null (0x0 in debugger). here function definitions(declared in namespace included in main): namespace.h int getarg(int istackpos,int *i); int getarg(int istackpos,float *f); template<typename tfirst> int getargs(tfirst first) { getarg(-1,first); } template<typename tfirst, typename... trest> int getargs(tfirst first, trest... rest) { int istackpos = ((sizeof...(rest) + 1) * -1); getarg(istackpos,first); getargs((rest)...); return 0; } namespace.cpp

node.js - Mongoose: how to check if document is modified via model.findOneAndUpdate() -

in mongoose, can check if update operation has modified document model.update() : model.update(query, update, function(err, raw){ if (raw.nmodified >= 1) console.log('document modified!') }); is there way same model.findoneandupdate() ? model.findoneandupdate(query, update, { new: true }, function(err, doc){ if (doc) { // mongodb found document, there way // know document indeed modified? } }); you can pass option { passrawresult : true } mongoose advice mongoose pass raw result of underlying mongodb driver, in case mongodb-native, third argument callback. mongodb-native documentation findoneandupdate model.findoneandupdate(query, update, { new: true, passrawresult : true }, function(err, doc, res){ // res // { value: { _id: 56a9fc80a7f9a4d41c344852, name: 'hugo updated', __v: 0 }, // lasterrorobject: { updatedexisting: true, n: 1 }, // ok: 1 } }); in case update did not succeed due no matchi

c# - Get listview item from image click (UWP) -

i have listview each row has few images , text blocks. if use itemclick event listview, can clicked item (binded object) using this: private void mainlistview_itemclick(object sender, itemclickeventargs e) { var device = (device)e.clickeditem; } but want distinguish between clicks on different elements (images) within listview row. use tapped event imageview (which inside listview) event handler looks this: private void image_tapped(object sender, tappedroutedeventargs e) { } how can clicked listview item in case? you can item data context of tapped element var fe = sender frameworkelement; var device = fe.datacontext device;

android - Meteor update a deployed app with signed APK -

i made app using meteor. deployed it, , made ready deploy play store using tutorial: https://guide.meteor.com/mobile.html#submitting-android now found bug, want update app. do have start on again creating new .apk files? or using meteor deploy myappname.meteor.com enough? or there fast way update .apk files? yours, l you have sign app using key have used first app publishing. is, not use keygenerator again skip step , sign app generated file.

Drag and drop tree view asp.net c# without third party control -

i'm looking asp.net treeview drag , drop functionality without using third party control. can guide me javascript code? this not possible out of box. of course write own drag & drop functionality, effort huge , need have js and/or jquery skills this. i prefer using third party js/jquery treeview control drag , drop capabilities. have less headache using existing 1 less error rate.

objective c - Container View Controller Programmatically -

i have been researching while can't quite find need. learn how create container view child view controller programmatically. i'm still new , learning basics, gather, used done using resuable views , attaching them child view controllers prior container view object being added library (right?), looking either tutorial or example code shows how scratch, using xib's, without complications, adding table cells etc... container , child programmatically. make sense? i'm sure there must on s.o. if can help. update ---------------------------------------------------------------------------------------------------------------------- have managed create child view controller appears uibutton action. relevant code: - (ibaction)pressed:(id)sender { childviewcontroller *childviewcontroller = [[childviewcontroller alloc]init]; [self displaycontentcontroller:childviewcontroller]; } - (void) displaycontentcontroller: (uiviewcontroller*) content { [self addchildviewc

java - Webi Rich Client Null Pointer Exception Error -

i'm trying create new webi document based on duplicate old 1 have been migrated boxi 3.1. make changes (filters, expressions) without problem. when save (in different folders) , try reopen it, following error : an error has occured details: java.lang.nullpointerexception @ com.sap.webi.ui.action.pagesizeaction.onupdateui(pagesizeaction.java:278) and document damaged ! can open other documents. i'm on sap bi 4.1 platform sp3, server on 4.1 native version. i noticed .glf created before getting error has following content : |527a5b9c76094be390d9b582d003d7ce0|2016 01 27 11:25:58.876|+0000|error| |>=|e| |tracelog| 9504| 38|opendoctask-5515057-1| |0|0|0|0|-|-|-|-|-|-||||||||||com.sap.sl.sdk.parser.xml.serverobjectparser||unknown data type "error" |527a5b9c76094be390d9b582d003d7ce1|2016 01 27 11:26:00.636|+0000|error| |>=|e| |tracelog| 9504| 38|opendoctask-5515057-1| ||||||||||||||||||||com.sap.webi.client.toolkit.document.documentinstancewrapper||

Error in Launching Android Virtual Device(AVD) -

Image
i tried create emulator(avd) test app.when tried got window. after referred other webpage use following path install hax-m d:\mysdklocation\sdk\extras\intel\hardware_accelerated_execution_manager\intelhaxm-android but got next error. please me create avd. update even followed steps of link stackoverflow link .but couldnt solve above bug. still have not found hyper-v in system...what have do? please me..thanks in advance. try use usb debugging instead of using emulator usb debugging follow link http://developer.android.com/tools/device.html or try video link: https://youtu.be/ucs34bkfpb0

virtual machine - Is intermediate representation (such as bytecodes or .net IL) still an advantage? -

is intermediate representation --ir--such java bytecodes or .net cil , still advantage? can’t deploy software components in source-code? one of arguments in favor of ir, portability of software components, avoids need of compiling source code each target architecture (regarding existence of virtual machine architecture). ir offers abstraction on each architecture specificities. in same way , metadata brings other advantages in terms of enabling security guarantees; checking safety accesses; etc. today, technologies such node.js (with v8 engine) introduces idea of deployable components in source code, called packages in node.js (i not sure if seminal idea in node.js). source code contains same information of ir + metadata . moreover, using components in source code, not prevent runtime engine using same principles of modern virtual machine such just-in-time compilation , late-bound data types, allows adaptive optimization , in theory can yield faster execution. so, there

closures - Converting an Objective-C block to Swift 2.0 -

objective-c block: [networhandler composerequestwithmethod:methodrespondtoappointment paramas:queryparams //nsdictionary oncomplition:^(bool success, nsdictionary *response){ // nslog(@"dict: %@", response); }]; now want represent in swift. how should it? update: let handler = networkhandler.sharedinstance() as! networkhandler let dict = ["":""] handler.composerequestwithmethod("", paramas: dict) { (success, response) -> void in } this worked me. in swift, if trailing argument closure can use shortened version of anbu.karthik's answer: networhandler.composerequestwithmethod(methodrespondtoappointment, paramas: queryparams) { success, response in // nslog(@"dict: %@", response) }

regex - convert a single column into tabular format -

i have file contains entries in single column like: 0 syscatspace 16384 13432 2948 1 1 tempspace1 1 1 applicable 1 2 userspace1 4096 1888 2176 1 but want convert in tabular form of 3*6 : 0 syscatspace 16384 13432 2948 1 1 tempspace1 1 1 applicable 1 2 userspace1 4096 1888 2176 1 can me.. using sed: sed -n 'n;n;n;n;n;s/\n/ /gp' input which reads 6 lines, replaces newlines spaces , prints out single line. , if want align columns can column : sed -n 'n;n;n;n;n;s/\n/ /gp' input | column -t

osx - How to duplicate a batch of files in finder -

i've never used apple script before , find myself needing accomplish repetitive task. need batch duplicate , rename number of files following pattern. preferably need dialogue box saying "how many duplicates?" so if have this: 1-1.jpg 1-2.jpg 1-3.jpg (it number of files highlighted, not three) what want highlight 3 files services menu invoke applescript ask how many duplicates want make rename them thus: 2-1.jpg 2-2.jpg 2-3.jpg 3-1.jpg 3-2.jpg 3-3.jpg... obviously depends on how many duplicates need. this 1 minute job applescript knowledge alas it's going take me time learn this! if highlight files , press command+d (duplicate) many times need duplicates, without applescript. thing different more-clearly named duplicates: 1-1.jpg 1-1 copy.jpg 1-1 copy 1.jpg 1-1 copy 2.jpg etc. if want automate in services menu, can build service automator. services menu not typical place run applescripts from. there script menu that, can

jenkins - Can I add Committers List/Email List to the Content of the Email-ext Plugins? -

i need committers list when build failed,can add committers list or committers' email list content of email-ext plugins?is there env ${committers}? @tracy - jenkins not expose committers information environment variables. neither email-ext plugin. email extension plugin lets create own email format using own jelly script. take @ this , this see how configure type of email format, go the email extension plugin page , search 'jelly content'. should take section. try out , let me know how works.

angularjs - Extending Chips from angular-material -

i'm trying create layer on top of md-chips called chip-filter which has functionality build in;e.g. a navigation chip (when removed, redirects user specific url) add place n app chip ... so got basics working, hooking in componentsregistry, , being able call place. but i'm trying chips chipfiltercontroller <md-chips> html: <chip-filter md-component-id="testid"> <md-chips ng-model="chips"> <md-chip-template> <strong>{{$chip}}</strong> <em>(type)</em> </md-chip-template> </md-chips> </chip-filter> and directive: function chipfilterdirective($log) { function postlink(scope, element, attr, sidenavctrl) { element.on("$destroy", function() { sidenavctrl.destroy(); }); } return { restrict: "e", scope: {}, controller: "chipfiltercontroller", compile: function(element) { return post

javascript - Packaging app With Electron and Asar -

i have weird problem, i'm trying make website work offline (elearning course made adapt), i've created electron app wrapper: main.js creates browserwindow loads index.html function createwindow() { // create browser window. mainwindow = new browserwindow({ width: 800, height: 600, "min-width": 800, "min-height": 530, resize: true, "use-content-size": true }); // , load index.html of app. mainwindow.loadurl('file://' + __dirname + '/index.html'); // open devtools. mainwindow.webcontents.opendevtools(); // set window resizable mainwindow.isresizable(true); // emitted when window closed. mainwindow.on('closed', function () { // dereference window object, store windows // in array if app supports multi windows, time // when should delete corresponding element. mainwindow = null; }); } the

how to pass the name of dataframe list inside a list using a loop in r -

i have list of dataframes try apply function. function should iterate 3 times. after each iteration results should saved on results list. my data frames have numeric content , different names of columns except last 6 columns (which have same name). my code follows: # suposse have 3 df following names myfirstdf myseconddf mythirddf mydflist # list containing 3 data frames (i in 1:3){ results[[i]] <- lapply(mydflist, function(x) { longdata <- ncol(x)-i sum ( x[,1:longdata]) } ) names(results[[i]]) <- sprintf("results[[i]]", 1:length(results)) } what want access results of each dataframe adding ith number of iteration, like: results$mydflist$myfirstdfi where i will number of iteration results$mydflist$myfirstdf1 . code i've got results$results1$results1 your code produces list of length 3, number of iterations, , each of 3 list items again list of length 3, number of dataframes in mydflist . formulation what want access resul

How to make a rtsp server with gstreamer on Windows? -

i trying create rtsp server stream feed webcam encountering issues. i installed lastest version of gstreamer-devel windows 7 plug-ins. i have been able achieve on linux c++ script : gst_rtsp_media_factory_set_launch(factory, "v4lsrc device="/dev/video0" "! video/x-raw", format=(string)i420, width=(int)320, height=(int)240, framerate=(fraction)15/1" "! x264enc" cabac=true tune=zerolatency byte-stream=true sliced-threads=true threads=0 speed-preset=1 " "! rtph264pay pt=96 name=pay0 " ")"); i can visualize webcam feed on windows through command line, command "gst-launch-1.0 ksvideosrc device-index=0 ! autovideosink" however, unable on windows through visual studio express 2013. have tried replace "v4lsrc ..." "ksvideosrc device-index=0" , remov

c# - CellEditEnding not working -

Image
i have datagrid on want control value entered numeric. so when enter wrong value in picture i want restore previous value. to need catch new entered value when that you can see still old value before editing. have got new entered value has analyzed after enter key pressed? use celleditingtemplate : <datagridtemplatecolumn> <datagridtemplatecolumn.celltemplate> <datatemplate> <textblock text="{binding age}"/> </datatemplate> </datagridtemplatecolumn.celltemplate> <datagridtemplatecolumn.celleditingtemplate> <datatemplate> <textbox lostfocus="textbox_lostfocus" background="aquamarine" text="{binding age, mode=twoway, updatesourcetrigger=propertychanged}"/> </datatemplate> </datagridtemplatecolumn.celleditingtemplate> </datagridtemplatecolumn> and handle lostfocus event of te

Excel VBA Iterate Array of Range Objects -

i trying iterate through array of range references. dim labels collection set labels = new collection dim mylabel range set mylabel = finddatarow(mysearchterms, currentworksheet) ' <- returns range labels.add (mylabel) later i'm trying iterate through range references , following code not work: runtime error 424. understand object required, how did label become string. dim label variant set label = nothing each label in labels debug.print (label & " in: " & label.row) next label i have tried following this other answer here since i'm new vba in excel not understand how range reference put in data structure , later retrieved/referenced access label.row want above (at point says "~~> whatever want range here") my understanding far labels is collection , not care type items in have. added range references. can't retrieve them later. going wrong? remove brackets add method forces value of range added collection

android - How can I program the back button on the action bar to go back to the previous activity? -

i want know how can program button in action bar revert previous activity , finish activity shown? about.class public class extends fragmentactivity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.about); getactionbar().setdisplayhomeasupenabled(true); // tracker. tracker t = ((analyticstracker) getapplication()).gettracker(analyticstracker.trackername.app_tracker); // enable display features can see demographics in google analytics t.enableadvertisingidcollection(true); // set screen name. t.setscreenname("about"); // send screen view. t.send(new hitbuilders.appviewbuilder().build()); fragmentmanager fragmentmanager = getfragmentmanager(); android.app.fragmenttransaction fragmenttransaction = fragmentmanager.begintransaction(); adview ls_fragment = new adview(); fragmenttransac

Azure: Role environment . FAILED TO INITIALIZE. hr: -2147024891 -

again azure web app down quite few minutes (at least 5-10 minutes) in middle of day. during low load, horrible experience customers. requests take forever giving returning 503 after long period of time. when in logs see low activity , low memory , cpu useage. i've downloaded logs , see following entries: role environment . initializing role environment . initialed returned. hresult=-2147024891 role environment . failed initialize. hr: -2147024891 role environment . initializing role environment . initialed returned. hresult=-2147024891 role environment . failed initialize. hr: -2147024891 does know what's going on? have 2 standard instances running.

sql server - Create a Live Replica Database -

our company developing website , pulls information our internal production servers. added security asked if set new server , pull that. know can have nightly load done populate replica server want updated @ least every 15 minutes. have solution keep replica database date possible while database still in full use? note using sql server 2008 r2 you can set replication if have enterprise edition of sql server. otherwise, can run job every 15 minutes uses ssis update latest info. source tables need have kind "updatedon" datetime column know data need import/update.

Android - Showing progress dialog in a separate class which extends AsyncTask -

i have class called myapi , used getting information server db. class has several classes used individual information, example getcourseinformation , login , register , , many more. it worked until point realized need progressdialog . indeterminate progressdialog exact. tried doing : progressdialog progressdialog; context context; public myapi(context context) { this.context= context; } public myapi() { } to context of class myapi called. and below how use in 1 of class. public class login extends asynctask<mylogin, string, string>{ @override protected void onpreexecute() { progressdialog = new progressdialog(context); progressdialog.setmessage("loading..."); progressdialog.setindeterminate(true); progressdialog.setprogressstyle(progressdialog.style_spinner); progressdialog.setcancelable(true); progressdialog.show(); } ... } but doesn't work. says u

Increasing precision of numpy.dot (python) -

i'm attempting simulate physical system. in order propagate solutions need able multiply matrices of determinant = 1 describe each part of system. in code below t(variables) 2-dimensional matrix det(t) = 1, indicates region number , rest irrelevant. when run code systems more 30 regions, final msys no longer has determinant = 1. checked value of determinant of msys throughout calculation , it's 1 first few iterations starts diverging that. i've tried putting dtype = float64 when creating array t see if improve precision , stop breaking down saw no improvement. is there way write code avoid error accumulating or way can increase amount of decimal places numpy stores make error negligible systems 100+ regions. for in range(n): if == 0: msys = t(l[i],i,k) else: msys = numpy.dot(t(l[i]-l[i-1],i,k), msys) return msys all f

javascript - CSS Style only text within a paragraph tag -

i have page of text , formatted similar this <div class="container"> <p style="text-align: center;"> <span style="text-decoration: underline;"> <strong> <img src="//cdn.shopify.com/s/files/1/0652/9219/files/horizontal.jpg?13817493546805475501" alt=""> </strong> </span> </p> <p style="text-align: center;"> <span style="text-decoration: underline;"> <strong>the hosting</strong> </span> </p> <p> in-laws arriving, friends in town, , heading abode night filled holiday cheer. stress levels tend rise during these events, expenses well. here few tips nail hostess game, without breaking bank , <em>still</em> shopping consciously. </p> </div> i looking keep images fit entire content width of

java - Focus to the EditText doesn't work -

Image
i'm using broadcast receiver show dialog.so flow of code like: step1 getting requestcode value step2 based on requestcode broadcast receiver goes if or else if or else part step3 if value entered using scanner edittext(i.e scan) doesn't matches shows toast "item not available". step 4 once "item not available" toast comes need focus on edittext(i.e scan) next time can put fresh value in after clearing it. so question "how can give focus edittext" , set edittext(i.e scan). for reference i'm attaching snap code snippet , layout.xml.please have , drop suggestions why focus going listview. .java snippet final broadcastreceiver mbroadcastreceiver = new broadcastreceiver() { @override public void onreceive(context context, intent intent) { if (intent != null) { loc = mspinner.getitematposition(mspinner.getselecteditemposition()) .tostring(); final string i

Pixel C not found by Android Studio/ADB -

Image
i got pixel c tablets , nexus 5x phones in test week, , got usb-a usb-c cables use tablets/phones debugging android studio. now, problem i'm having is, nexus 5x's being detected fine android studio, pixel c's not. pixel c's being detected os, device shows in windows explorer, nothing when looking @ android device manager. usb debugging enabled on both devices, , i've tried using various usb settings (mtp/ptp) no luck. appreciated, , i've attached picture showing devices in explorer , android studio. thanks! i had click 'update driver...' > 'browse computer driver software' > 'let me pick list of device drivers on computer' , chose 'android device' , it's working. perfect solution

integration - Is there a possibility to get data from google analitycs to CRM via API or else? -

we have web site , crm. user fills form on web page send data crm contact. google analitycs gets more info user directly web site. there possible way data analitycs combine crm data? if important: bitrix24.com used crm (installed on our server). in advance. you need web-site: https://developers.google.com/apis-explorer/?hl=en#p/analytics/v3/analytics.data.mcf.get construct api-request. set customerid in filters field this: mcf:adwordscustomeridpath=={customerid1}

ios - XCode Swift: Adding new class variables to existing Class -

i looking way extend existing class new variables without creating own new class, e.g. add nsindexpath uitableviewcell able access row or section without use of tags. i known can add new functions extension extension uitableviewcell { // can func myextendedfunction() {} // not possible var indexpath:nsindexpath } is there way this, or have build own classes? you need subclass add properties class. there workarounds relying on objc runtime allow associate objects each other, these should not used in typical case (they typically more complex subclassing, make relationships between objects non obvious, , have own limitations).