Posts

oracle - Pl-Sql User Connection -

i've been starting oracle on job. i've been using ms time. have problem on user-shema structure. tryed create table sql query, table had been created in somewhere else wanted. (i've created user named lpa) wrote query, , table in (generaldatabase) tablespaces->users->(here). want create table in lpa schema, under table folder. i've been searching could'nt it. need please. ps:i found need connect user, write query ts_lpa(thats tablespace). cant connect user lpa.(we can first problem) in oracle there no "dbo" or default schema, in case looking for. must specify target user account when connect (log in) database, , account used default schema of subsequent actions. (this similar home directory in linux, if log in williamr , create file, belong williamr , not generic default account.) in case suspect connecting sys or similar, in case table belongs sys (or whoever connected as). you'll need drop , try again. if don't want p...

delphi - How to process an asynchronous queue from within the main UI thread? -

i designing 2 components asynchronously receive objects of custom class (tmelogmessage) , store them in thread-safe internal container. first component non visual (tmefilelogger) , should write info these objects log file (non surprisingly). second component (tmeloggrid) visual fmx.grid descendant should visualize info these objects in ui. these objects is, think, irrelevant. the problem facing these components not know when these objects enqueued in internal container, have check container see if there new objects need processing, process them , remove them queue. ideally i'd want done when application not busy, in way similar action updating, not bog down ui. it wrong component hook event handler application.onidle... maybe subscribe tidlemessage, i'm not sure idea, i've read applications never go idle. using internal timer seems bit old-school. maybe use low priority thread poll queue , synchronize ui when find object process. don't have other ideas though. ...

python - Numpy vectorized summation with variable number of factors -

i computing function contains summation on index. index between 0 , integer part of t; ideally able compute summation several values of t. in real-life case, of values of t small, small percentage can 1 or 2 orders of magnitude larger average. what doing is: 1) define vector t, e.g. (my real-life data have larger number of entries, give idea): import numpy np t = np.random.exponential(5, 10) 2) create matrix containing factors between 0 , int(t), , zeroes: n = int(t.max()) j = ((np.arange(n) < t[:,np.newaxis])*np.arange(1,n+1)).astype(int).transpose() print(j) [[ 1 1 1 1 1 1 1 1 1 1] [ 2 0 2 2 2 0 2 0 2 2] [ 0 0 3 0 3 0 3 0 3 3] [ 0 0 4 0 4 0 0 0 4 4] [ 0 0 5 0 5 0 0 0 5 5] [ 0 0 6 0 6 0 0 0 6 6] [ 0 0 7 0 7 0 0 0 0 7] [ 0 0 8 0 8 0 0 0 0 8] [ 0 0 9 0 9 0 0 0 0 9] [ 0 0 0 0 10 0 0 0 0 10] [ 0 0 0 0 11 0 0 0 0 0] [ 0 0 0 0 ...

c# - How to call this method in a background worker? -

i beginner in c# , wpf , building project in have trigger when mouse moved. under conditions, have use background worker. want call mouse_moved method in background, don't know how . can me please? code far: public mainwindow() { initializecomponent(); mouse = new mouseinput(); mouse.mousemoved += mouse_mousemoved; } void mouse_mousemoved(object sender, eventargs e) { //the code need } private void worker_dowork(object sender, doworkeventargs e) { //where want call mouse_moved method } create method , call both: void mouse_mousemoved(object sender, eventargs e) { domousemovedwork(); } private void worker_dowork(object sender, doworkeventargs e) { domousemovedwork(); } private domousemovedwork() { //the code need }

NLog callback possible? -

i in process of converting home grown logging system nlog , wondering if there way add event logger or otherwise support mechanism when log message can callback final formatted message , loglevel. use send server messages connected client. thx this mcve of talking in comments. create target accepts callback functions: [target("myfirst")] public sealed class myfirsttarget : targetwithlayout { private readonly action<string>[] _callbacks; public myfirsttarget(params action<string>[] callbacks) { _callbacks = callbacks; } protected override void write(logeventinfo logevent) { foreach (var callback in _callbacks) { callback(logevent.formattedmessage); } } } configure nlog use target. programmatically since callbacks passed in constructor. can configure target in nlog.config, target need singleton can register callbacks in code. class program { public static void main(...

Styling ASP.net controls with bootstrap -

i trying style quiz checkbox/radio button lists controls in asp.net match of bootstrap static variants found here: http://getbootstrap.com/javascript/#buttons-checkbox-radio this works fine using following lines of code: <asp:radiobuttonlist id="rblquestion1" runat="server" repeatdirection="vertical" repeatlayout="flow" cssclass="btn-group" data-toggle="buttons"> <asp:listitem class="btn btn-default radio-inline" value="1">answer one</asp:listitem> <asp:listitem class="btn btn-default radio-inline" value="2">answer two</asp:listitem> </asp:radiobuttonlist> but have 3 problems: the items rendered in steps so: http://i.imgur.com/am1a1gh.png , believe cause "repeatlayout=flow" property, without element isn't displayed shown on bootstrap website http://getbootstrap.com/javascript/#buttons-checkbox-radio when displayed on...

android - can't get values out of ondatachange method -

i'm developing android app i'm using firebase database when in got variable in ondatachange method , assign them global variables got null variables when call variables in ondatachange method not null. public class positionatemarkertask extends asynctask { public arraylist<location> arraylist= new arraylist<>(); public void connect() { //setting connexion parameter final firebase ref = new firebase("https://test.firebaseio.com/test"); query query = ref.orderbychild("longitude"); //get data db query.addlistenerforsinglevalueevent(new valueeventlistener() { @override public void ondatachange(datasnapshot datasnapshot) { //checking if user exist if(datasnapshot.exists()){ (datasnapshot usersnapshot : datasnapshot.getchildren()) { //get each user has target username locatio...