Posts

c# - Why does this implementer method not see its sibling? -

i've got class implements interface: public class sqlitehhsdbutils : ihhsdbutils { void ihhsdbutils.setupdb() { . . . if (!tableexists("appsettings")) . . . bool ihhsdbutils.tableexists(string tablename) { . . . it can't find own brother sitting right below (the if (!tableexists() ): the name 'tableexists' not exist in current context how can / why not see it? you have explicit interface implementation. can't access interface methods directly unless cast current instance interface type: if (!((ihhsdbutils)this).tableexists("appsettings")) from 13.4.1 explicit interface member implementations it not possible access explicit interface member implementation through qualified name in method invocation, property access, or indexer access. explicit interface member implementation can accessed through interface instance, , in case referenced member name.

java - replace random number of characters at random position with wildcard -

i trying create program replace random number of characters @ random position "*". star letter used in main program , replaced "." wildcard matches possible result. so far manage create code see bellow. replaces 1 character of specific word. here on appreciated. example: input word: mouse random generator how characters replace: 3 random generator @ places replace: 1, 3, 5 result: *o*s* public class random_2 { public static void main(string[] args) { string test; int dolzina = 0; string outputfile = "random_2.txt"; arraylist<string> list = new arraylist(); try { file file = new file("random1.txt"); filereader filereader = new filereader(file); bufferedreader bufferedreader = new bufferedreader(filereader); string vrstica; while ((vrstica = bufferedreader.readline()) != null) { list.add(vrstica); // dolzina=list.size(); // sy...

python script to scan a pdf file using online scanner -

i used code scan multiple pdf files contained in folder online scanner " https://wepawet.iseclab.org/ " using scrip. import mechanize import re import os def upload_file(uploaded_file): url = "https://wepawet.iseclab.org/" br = mechanize.browser() br.set_handle_robots(false) # ignore robots br.open(url) br.select_form(nr=0) f = os.path.join("200",uploaded_file) br.form.add_file(open(f) ,'text/plain', f) br.form.set_all_readonly(false) res = br.submit() content = res.read() open("200_clean.html", "a") f: f.write(content) def main(): file in os.listdir("200"): upload_file(file) if __name__ == '__main__': main() but after execution of code got following error: traceback (most recent call last): file "test.py", line 56, in <module> main() file "test.py", line 50, in main upload_file(file) file ...

php - How to modify OpenFire default password encryption algorithm? -

by default, openfire server encrypts passwords using blowfish encryption whereby key stored in table ofproperty where propvalue = 'passwordkey' . how can customize behavior? how can set openfire use encryption algorithm, or replace encryption algorithm hashing instead? change system properties store plain password in openfire server , encrypt password(as per need) before sending password. to change system property: go to server->server manager->system properties edit property user.useplainpassword , give property value true .

titanium alloy get value of field in view -

i've been building first titanium alloy app , have 5 step signup form has different form fields spread across 5 views. on last step want post values of form elements. best way access each fields value? eg. in screen5 how value of $.name field in screen1 view? here of code: <scrollableview id="indexsv" showpagingcontrol="false" scrollingenabled="false" top="0"> <require src="screen1" id="screen1"></require> <require src="screen2" id="screen2"></require> <require src="screen3" id="screen3"></require> <require src="screen4" id="screen4"></require> <require src="screen5" id="screen5"></require> </scrollableview> and here how screens structured: <alloy> <view> <label top="20...

latex - How to reduce the size of captions in all figures -

Image
i want captions of figures , table have same size \footnotesize. there put in preambule of document this? use caption package set font key-value footnotesize : \documentclass{article} \usepackage{caption} \captionsetup{font=footnotesize} \begin{document} regular text set in \verb|\normalsize|. \begin{table}[t] \caption{a table using \texttt{\string\footnotesize}.} \end{table} \begin{figure}[t] \caption{a figure using \texttt{\string\footnotesize}.} \end{figure} \end{document} it possible adjust label , text formats individually figure s , table s separately. however, consistency better option here.

How to post/upload recorded video as blob in MVC using HTML5/ Javascript at client side and C# code at controller? -

i building video surveillance application requirement save recorded video feeds server can served viewer later. using mediarecorder api so, , continuous stream end in large file difficult posted @ once, plan chop stream blob multiple chunks , keep posting periodically. recording event fired toggle switch in html page , javascript takes over. here code have far: html: some code... <div class="onoffswitch"> <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="switch1"> <label class="onoffswitch-label" for="switch1" onclick="togglevideofeed();"> <span class="onoffswitch-inner"></span> <span class="onoffswitch-switch"></span> </label> </div> some code... javascript: var mediarecorder; var pushinterval = 6000; var id, counter...