Posts

Showing posts from September, 2012

vb.net - Get content from HTML list in VB -

okay, have html list of items want use autocomplete source vb application. can't seem strip html out of string. html list follows: <option value="0001">string example 1</option> <option value="0002">string example 2</option> ... can advise way of getting content out of huge list that? thinking reading text file line line , extracting content html, i've never worked html in vb before , i'm not sure how it... figured below work, i'm not sure how ask vb content only. any appreciated. dim objfso = createobject("scripting.filesystemobject") dim objfile = objfso.opentextfile(my.computer.filesystem.specialdirectories.desktop & "\test2.txt", 1) until objfile.atendofstream txtline = objfile.readline 'get content of line here. 'add content new string. loop use htmlagilitypack library load html, traver...

Trouble using an array in a class (C++) -

i've looked through various forum posts here , other sites have not seen referring similar problem. problem i'm having is: studentinfo array not run besides when array elements 6 or below. i want able have array size of 23 , code returns: bash: line 12: 51068 segmentation fault $file.o $args the code i've provided below simplified version of actual code. have use array in program (no vectors may want suggest) because part of assignment. still little new c++ explanation answers awesome. help! #include <iostream> #include <string> using namespace std; class studentgrades { private: string studentinfo[23]; public: void setstudentinfo(string info) { (int = 0; < 23; ++i) { studentinfo[i] = info; } } string getstudentinfo() { (int = 0; < 23; ++i) { cout << studentinfo[i] << " "; } } }; int main() { studentgrades student1; studen...

SQL ORACLE Procedure to determine whether a date is between two dates -

i trying make procedure determines zodiac sign of person, given his/her date of birth. input has in format of 'dd-mon-yyyy' (eg. '16-aug-1987'). trying find proper way this. part of incorrect code follows: create or replace procedure zodiac_test(dob varchar2) begin if dob between '29-sep-%' , '19-oct-%' dbms_output.put_line('a libra'); else dbms_output.put_line('not libra'); end if; end; basically, goal here determine whether date between 2 dates, regardless year. how go problem? , suggestions? i've seen other answers in stackoverflow date format different , not asking write procedures. thought should ask here.

php - Create a table from and SQL database containing a drop down menu with a list of names from another SQL table -

Image
i need create table drop down menu , submit button in each row. drop down menu contains list of advisers sql table. when select , adviser , press submit button id of item in current row along selected adviser id or name must sent page. in case sent delete.php. my code bellow displays drop down menu , submit button each row of table, when press submit button work correctly if press submit button located @ bottom of table, if press other appears not send info drop down menu. ( know code appear messy, experimenting if unclear ask me , clarify. ) thank much! <!doctype html> <html> <body> <?php //this code qeue // connect database udinh sqli $con = get_sqli(); // results database if (!$con) { die('could not connect: ' . mysqli_error($con)); } //select whole list of students walk_in mysqli_select_db($con,"login"); $sql="select * walk_in"; $result = mysqli_query($con,$sql); if (!$result) { printf("error: %s\n...

asp.net mvc - asp identity with int as TKey - UserId not found exception -

i have implemented custom userstore , identityuser. have changed code uses int key type. the problem leave key generation database autoincrement field. now, on register, user saved db framework doesnt have id (its int default 0) since doesnt read return values db. (db did create new id autoincrement , saved framework dont have it) am doing wrong? questions: are suposed additional roundtrip db (find username, example) id? should we, on register, create 1 dummy record id , update real data? all of feels dirty. has solved problem? update: adding code it my identityuser: public class identityuser : iuser<int> { public int id { get; set; } public string username { get; set; } public string passwordhash { get; set; } public string securitystamp { get; set; } public string email { get; set; } public string phonenumber { get; set; } public bool isemailconfirmed { get; set; } public bool isphonenumberconfirmed { get; set; } publ...

In a CDI extension, what's the easiest way to tell whether an injection point will be satisfied? -

i writing cdi extension. what easiest way find out if given injection point satisfied during bean deployment, , remove if won't satisfied? processinjectionpoint -time early, because bean discovery hasn't completed yet, can't tell, of given injectionpoint , whether bean exists satisfy it. processinjectiontarget -time seems wrong place, because although injection points have been read there isn't way remove one. i need event lets me remove injection point injection target if can determine injection point won't satisfied. (background: messing programmatically translating guice's com.google.inject.inject annotation (which features optional attribute).) i don't think possible that, not way @ least. issue sounds similar discussed in cdi-45 issue , might worth describing use case there. for case, 1 thing comes me usage of @inject instance<mybeanclass> instead of classical injection. allows detect (in runtime) whether have (or more ...

Material design lite masonry layout with cards -

i'm trying create "pinterest" style layout material design lite. big issue far, i'm able create cards being same height. i have been able css , column count (without mdl), i'd use styling mdl provides. if use column-count mdl, cause weird layout. cards vary in size, , looks bad when have huge gaps inside them because gridlayout evens them out in height. hope makes sense. can paste wordpress theme code if necessary, i'm not sure if it's help. i hope can me out :-) you can use lightweight javascript http://masonry.desandro.com/ in order that. use this. <div class="mdl-grid masonry-grid"> <div class="mdl-cell mdl-cell--4-col-desktop masonry-grid-item"> </div> <div class="mdl-cell mdl-cell--4-col-desktop masonry-grid-item"> </div> </div> <script src="https://unpkg.com/masonry-layout@4/dist/masonry.pkgd.min.js"></script> <script> ...

Actionscript 3.0. Searching an Array for an integar and getting the value's index -

i still new actionscript , need hand something. i have array filled randomly generated numbers below 6, "order", example, might contain this. order[1,2,4,2] i need search integar stored in array. if integar present, add 1 variable "trial" index of value in "order" can clear specific index replacing value value that's outside of random generation range. so, example, if needed search "2" need code replace first "2" 7 example while leaving second 1 alone , adding 1 value of variable "trial". i can't think of way this, , attempts @ finding solution online has came 1 thread didn't understand because i'm still quite new actionscript. check link : array.indexof(item); which gives index of item in array var order:array = [1,2,4,2]; //create array order[order.indexof(2)] = 7; //find first position of '2' , replace '7' also indexof have optional argument defines start p...

c# - What is this compiler error with generics -

Image
i getting compiler error: the type 'generics.widget' cannot used type parameter 't' in generic type or method 'generics.mygenerics.maximum<t>(t, t, t)' . there no implicit reference conversion 'generics.widget' 'system.icomparable<generics.widget>' see attached screen shot compiler error in code trying use class. using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; namespace generics { // class implements icomparable class widget : system.icomparable { private string name; public widget(string name) { this.name = name; } int system.icomparable.compareto(object obj) { return name.compareto(((widget)obj).name); } } } you need implement generic version of icomparable public interface icomparable<in...

python how to make inner class to be type of outer class -

i have nested classes because tightly related. now want have following type of code class one(some-other-type): ... // more functions here class two(one): // more functions here. the inner class "two" type should "one" if put error. other way not make nested below class one(some-other-type): ... // more functions here class two(one): // more functions here. but dont want class "two" accessible when module imported. dont care functions offered "one" needs under clarity of code. any thoughts? you cannot refer class while being constructed. can refer class inside own method since method body isn't evaluated until after class in constructed. class one(object): @staticmethod def get_two(): class two(one): pass return two() def f(self): print("i %s" % type(self).__name__) two inherits f one >>> obj = one.get_two() >...

html - Can you use if/else statements to style divs in erb? -

sorry if terribly asked; first post on here. using erb ruby on rails , want know if can make background-color of div differ based on user selection. looked online , couldn't find answer. new , still trying learn how search. <div class="row"> <% @stores.each |store| %> <div class="col s12 m6"> <% if store.color = 'red' %> <% profile_color = 'red' %> <% elsif store.color = 'blue' %> <% profile_color = 'blue' %> <% elsif store.color = 'green' %> <% profile_color = 'green' %> <% elsif store.color = 'orange' %> <% profile_color = 'orange' %> <% end %> <div class="card <%= profile_color %> center"> <div class="card-content white-text"> ...

passwords - I am installing jenkins for the first time and how do i find the default user name -

i tried using jenkins or admin user name user , password. password tried update using sudo passwd jenkins, fine on that. skeptical user name. how confirm username jenkins. can pls help during initial run of jenkins security token generated , printed in console log. username admin the token should like, ************************************************************* jenkins initial setup required. security token required proceed. please use following security token proceed installation: 41d2b60b0e4cb5bf2025d33b21cb ************************************************************* for me initial admin password in log @ ~/.jenkins/secrets/initialadminpassword after installing homebrew. source

javascript - Promise response argument getting lost -

i'm learning browser-provided promises , i'm having difficulty response argument getting lost , not coming through. code: /* uploads resource given server , runs callback function when done */ function upload(serverurl, resource, successfulcallback, failcallback) { console.log("upload successfulcallback: ", successfulcallback); console.log("upload failcallback: ", failcallback); var jqxhr = $.ajax({ url: serverurl, method: "post", type: "post", contenttype: "application/json", data: encode(resource), headers: { accept: "application/json; charset=utf-8", prefer: "return=minimal" } }).done(function() { console.log("upload done, jqxhr: ", jqxhr); successfulcallback(jqxhr); }).fail(function(err) { console.log("upload failed: " + err.responsetext); failcallback(jqxhr, err); }); } function val...

computer vision - How to read the data of Adience benchmark(data set for gender and age classification)? -

Image
i trying train gender , age classification cnn, using data @ adience , got 2 questions. 1 : according website, bounding box of faces recorded in fields "x,y,dx,dy". example, fold_frontal_0_data.txt,the first data is image name : 10424815813_e94629b1ec_o.jpg (x,y,dx,dy) : 301 105 640 641 however, data of bounding box weird, because size of image 600x601 only, no matter treat (x,y,dx,dy) (left, top, width, height) or (left, top, right, bottom), cannot crop face expected. how crop face properly? 2 : need face alignment on training data? or need face alignment when testing?or both?thanks this image--10424815813_e94629b1ec_o.jpg

Wordpress visit all external links on page when I click any 1 link. -

i have developed affiliate website in wordpress. site contains list of godaddy domains in table. links affiliated links in table. problem when click on link table in wordpress website @ cj.com counts link click in list. for eg. have 405 domains in list of table, when click on 1 link @ cj.com shows 406 clicks. i have tried on fresh wordpress installation. here few example of source code: <table class="footable" cellspacing="0" cellpadding="0"> <thead> <tr> <th width="93px">domain name</th> <th width="50">price</th> <th width="93">auction end time</th> <th width="93">sale type</th> </tr> </thead> <tbody> <tr> <td><a href="http://www.anrdoezrs.net/click-8186857-10497118-1476294381000?url=https://in.auctions.godaddy.com/trpitemlisting.aspx?miid=205703908" target="new">x1r.biz</a>...

p2p - Identifying online users in WebRTC -

i trying create website implements webrtc functionality.but in samples , reference documents , unable find how select specific user chat with. need have server kind of setup list available users or that. sort of ideas helpful. for eg: in samples refered, user joining particular room or session , other recipient joins same room chat.but need similar skype or hangout shows callee status before call, , want rid of chat room concept. there 3 core areas of real time communication service: presence - identifying who's online , who's available speak call. (e.g showing contact list , identifying who's online) signaling - initiating call, exchanging ip addresses, negotiating capabilities, hanging up. in lot of cases, signaling , presence can combined single service. media connectivity , streaming - getting "connected" other endpoint , streaming audio/video. typically requires assistance signaling service initial set of local, stun, , turn addresses ex...

ios - Swift OpenGL ES app template? - BOUNTY -

i've been looking @ lot of tutorials trying find way make opengl app written in swift, can't seem find template use. most tutorials suggest using blank one, have write ton of files (such appdelegate) scratch, have no clue how do. i tried links on this , first 1 doesn't work , second 1 in objective-c. anyone have might me? i ended figuring out myself using glkit , smashing old tutorials. since opengl bunch of functions need find right parameters programming language. else trying this, there's useful resources here , here , , it's useful shove in ported code ray wenderlich if stuck. luck!

assembly - Time Base, assembler, PIC , propeller clock -

so, i'm doing propeller clock , should display hour , 1 name, using assembler , pic 18f4550 . think fine. it's can't manage "make" right time base. the pic works naturally @ 8 mhz. what i'm trying create routine counts 1 min, after that, clock add 1 minute "minutes", , on (that part done). the user set hour, 4 push buttons, , after set current hour, , press final push button. that's when time base kick in. i think can't last part, need time base, because can't seem understand in assembler (in c# i'd bid while o while or maybe for). one way see - maybe need make big delay - 1 lasts 60 seconds - can put in assembler language, or wrong? thank in advance guys. here's code clock: list p = 18f4550 #include<p18f4550.inc> config wdt = off config mclre = on config debug = off config lvp = off config fosc = intosc_ec delay1 equ 0x00 delay2 equ 0x01 aux1 equ 0x02 aux2 equ 0x03 org 0 mo...

c - Iterative Inorder Traversal -

here function iterative inorder traversal. when execute i'm getting segmentation fault. i'm using stack traversal. in given program have recursive function inorder traversal check if create() function working. i'm pushing node stack , moving left of node , after i'm popping node stack , printing , going right doing root=root->rlink . #include <stdio.h> #include <stdlib.h> typedef struct node { int data; struct node *llink; struct node *rlink; }node; typedef struct stack { node *a[10]; int top; }stack; void push(stack *s,node *root) { if(s->top==9) printf("full"); else { s->top++; s->a[s->top]=root; } } node *pop(stack *s) { if(s->top==-1) printf("empty"); return s->a[s->top--]; } void inorder(node *root) { stack s; s.top=-1; int flag=1; while(flag) { if(s.top!=9) { push(&s,root); root=root->llink; } else{ if(s.top...

oracle11g - Timestamp in Hive tables keeps changing -

i have hive table stores timestamp in yyyy-mm-dd hh:mm::ss.s format. have noticed value in such columns keeps changing, e.g. value sqooped '2016-01- 25 00 :00:00.0' (not always) value shown '2016-01- 24 19 :00:00.0'. to make matters worse, not happen in tables @ same time. table1 have correct format , table2 , incorrect 1 (2016-01- 24 19 :00:00.0) , vice versa i don't know if relevant, moved oracle hive. in oracle table date column of type 'date' stored datda 25-jan-16 in hive column of type 'timestamp' , stores data 2016-01-25 00:00:00.0 . the timestamp correct when sqoop data incorrect when check out later. could please tell me how fix or work around problem? i believe because of timezone problem. try using timezone udfs in hive , check whether getting right. eg. to_utc_timestamp

How do I pass a 2D array from JavaScript into PHP -

i working on school project involves extracting product data multiple online retailers using various apis/ajax calls, , sorting data in php (i use 1 ajax call each retailer). snippet of code working on shown below. cannot figure out how push temporary array containing product attributes ("average", "price", "name", "url", , "image") each product master array (array of arrays) , post master array php in such way can index values in sorting purposes. function get_results() { $(document).ready(function() { var master_array = []; $.ajax({ type: "get", url: "http//:www.source1.com", datatype: "xml", success: function(xml) { $(xml).find('product').each(function() { var average = $(this).find('average').text(); var price = $(this).find('price').text(); var name = $(this).find('name').text(); ...

touchimageview - Android: Glide not showing large image from URL -

i'm trying load large hi-res (3225x4800) image url glide newspaper company. image wanted load high res image . string url = "http://www.businessweekmindanao.com/content/wp-content/uploads/2015/10/fitness-and-wellness-poster-final.jpg"; glide.with(getactivity()).load(url).asbitmap().into(new simpletarget<bitmap>() { @override public void onresourceready(bitmap resource, glideanimation<? super bitmap> glideanimation) { imageview.setimagebitmap(resource); } }); i'm using mike ortiz' touchimageview solution offered here: https://github.com/mikeortiz/touchimageview/issues/135 when loading resource url. seems work on small resolution image , not load high quality image. there alternative solution tried stackoverflow: android: not displayed imageview uil , touchimageview tries modify onmeasure() method of mike's library. works with: glide.with(getactivity()).load(url) .into(imageviewpreview); the proble...

html5 - Will the character encoding(charset) declaration apply to the HTML file after saving it on my hard disk in following scenario? -

i'm using microsoft windows 10 home single language 64-bit operating system on laptop. i'm learning html on laptop w3schools html tutorial(the best in class tutorial available on internet). i wrote following html code simple notepad editor: <!doctype html> <html> <body> <h1>my first heading</h1> <p>my first paragraph.</p> </body> </html> then named file index.html , trying save on hard disk. while doing changed option encoding drop-down box ansi utf-8 , saved file on hard disk. so question without using proper syntax character encoding i.e. <meta charset="utf-8"> into <head> tag of html page character encoding apply file index.html saved hard disk. if yes how without adding code it? if no why after setting encoding type before saving file? the character encoding of file has how content of file saved. special characters etc. how file viewed different matter. depending on ...

javascript - Is there a way to obtain index in array in more concise way? -

curiosity sponsors question, it's fun hack in languages. assume there array holding objects of kind. objects have id property. id cannot empty string, false, null or falsey value. array can of 0 length. want obtain index of value (if present) , exit loop it's found. var id = /some value check/; var index; (var = 0, item; item = arr[i], item===undefined?false:item.id==id?(index=i,false):true; i++); what think? meanwhile did jsperf posted above suggestions. please play around if want. jsperf mentioned fastest initial example above under ff , while loop posted in comments under chrome. find solution arrow functions slowest in both cases. cannot test in ie use no win. i'm aware jsperf badly written - please play around.

android - Scrollview shows the the lst six buttons -

Image
i not experienced android developer. i have scroll view displays right in design view displays last 5 buttons on android device. here xml view. <?xml version="1.0" encoding="utf-8"?> <scrollview xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:fillviewport="true" android:orientation="vertical"> <linearlayout android:layout_width="match_parent" android:layout_margintop="5dp" android:orientation="vertical" android:layout_height="wrap_content"> <edittext android:id="@+id/old_email" android:layout_margintop="8dp" android:layout_width="match_parent" android:layout_height="40dp" android...

deep learning - Real Time Object detection using TensorFlow -

i have started experimenting deep learning , computer vision technologies. came across awesome tutorial . have setup tensorflow environment using docker , trained own sets of objects , provided greater accuracy when tested out. now want make same more real-time. example, instead of giving image of object input, want utilize webcam , make recognize object of tensorflow. can guys guide me right place start work? you may want @ tensorflow serving can decouple compute sensors (and distribute computation), or our c++ api . beyond that, tensorflow written emphasizing throughput rather latency, batch samples as can. don't need run tensorflow @ every frame, input webcam should in realm of possibilities. making network smaller, , buying better hardware popular options.

linux - Permission denied when attempt to create/remove/rename files in write-only directory -

there tons of posts on net saying write permission on directory allows affected user create/remove/rename files in directory, found not done without execute permission set. tried calling open/fopen/remove/rename , without exception, failed. there should missed or misunderstood. there explanation operations on directory involves file operation. if right, wonder operation involved. if directory maintains mappings filename inode, seems no reason file operation involved when renaming. if unexpected file operation involved, possible manipulate directory directly, bypassing such operations? you right, net full of wrong things , unix file permission rules. first links found common search engine wrong. interesting! what file permissions on directories means: x have "access" files in directory means can use them. if not have read access access rights, can work file know can't see! mkdir 1 touch one/x.h chmod -r 1 ls 1 // fails! cat one/x.h // works! a...

php - Column rowspan using jquery -

i have table double click event on every each of rows. when double click on row, display row called ".matching". besides that, want create column rowspan if hidden ".matching" row displayed. below shows php part: <table> <tr ondblclick="rowdoubleclick(this);"> <td>...</td> <td>...</td> <td class="lastcolumn">rowspan here</td> </tr> <tr class="matching" style="display:hidden;"> <td colspan="2">hidden row shows here</td> </tr> </table> and jquery: function rowdoubleclick(e) { var tablerow = $(e).closest('tr'); var rowammend = $('.lastcolumn'); var matching = $(e).closest('tr').next('tr.matching'); if(matching.is(":hidden")) { tablerow.attr('rowspan','2').css({'border-bottom':'transparent'}); matching.slidetoggle("fas...

javascript - Foundation 6 Slider using disabled with a set value -

i have been racking brain trying figure 1 out. have large amount of these bars through out site. of bars show default value can not changed. site running foundation 5 , bars work fine when converting 6 system fails. following code default sample displays initial value. <div class="slider" data-slider data-initial-start="50" data-end="200"> <span class="slider-handle" data-slider-handle role="slider" tabindex="1"></span> <span class="slider-fill" data-slider-fill></span> <input type="hidden"> </div> now take code , add disabled class slider. when disables slider moves slider 0. <div class="slider disabled" data-slider data-initial-start="50" data-end="200"> <span class="slider-handle" data-slider-handle role="slider" tabindex="1"></span> <span class="slider-...

How to use namespace and use in PHP? -

i have file index.php in directory main ; there directory helpers inside main class helper . i tried inject class helpers\helper in index.php as: <? namespace program; use helpers\helper; class index { public function __construct() { $class = new helper(); } } but not work. how use namespace , use in php? with description, directory structure should similar this: main* -- index.php | helpers* --helper.php if going book regards psr-4 standards , class definitions similar ones shown below: index.php <?php // file-name: index.php. // located inside "main" directory // presumed @ root of app. directory namespace main; //<== notice main here namespace... use main\helpers\helper; //<== import helper class use here // if not using auto-loading mechanism, may have // manually import...

Creating text files through php in linux -

i trying create new text file through php following command:- <?php $new = fopen('newfile.txt', 'w'); ?> somehow unable create because of permissions issues of linux. can create text file first set it's permissions. or there way in code itself? either way need job done. you can create directory , give 744 permissions $dir = 'output'; if ( !file_exists($dir) ) { $mask = umask(0); // helpful when used in linux server mkdir ($dir, 0744); } file_put_contents ($dir.'/test.txt', 'hello file');

linux - deleted symlink sudo rm /lib64/libc.so.6, how to address it? -

i make mistaken delete libc.so.6 sudo rm /lib64/libc.so.6 . os centos 6.4: linux k20-1 2.6.32-358.el6.x86_64 #1 smp fri feb 22 00:31:26 utc 2013 x86_64 x86_64 x86_64 gnu/linux i try run following rebuild 1 sudo ld_preload=/lib64/libc-2.12.so ln -s /lib64/libc-2.12.so libc.so.6 sudo: error while loading shared libraries: libc.so.6: cannot open shared object file: no such file or directory failed. 2 and, can not rebuild soft link also: [llf@k20-1 lib]$ sudo ln -sf /lib64/libc-2.14.so /lib64/libc.so.6 sudo: error while loading shared libraries: libc.so.6: cannot open shared object file: no such file or directory 3 use statically linked: [llf@k20-1 lib64]$ sudo /sbin/sln /lib64/libc-2.12.so /lib64/libc.so.6 sudo: error while loading shared libraries: libc.so.6: cannot open shared object file: no such file or directory it's remote server, can not insert setup disk server set , restart computer. , not root, i have sudo privilege. how address mistake? thanks! ...

android - Application doesn't work on API 19 or less -

e/androidruntime: fatal exception: main process: salis.optimal.com.optimal, pid: 3913 java.lang.runtimeexception: unable provider com.google.firebase.provider.firebaseinitprovider: java.lang.classnotfoundexception: didn't find class "com.google.firebase.provider.firebaseinitprovider" on path: dexpathlist[[zip file "/data/app/salis.optimal.com.optimal-1.apk"],nativelibrarydirectories=[/data/app-lib/salis.optimal.com.optimal-1, /vendor/lib, /system/lib]] @ android.app.activitythread.installprovider(activitythread.java:5196) @ android.app.activitythread.installcontentproviders(activitythread.java:4788) @ android.app.activitythread.handlebindapplication(activitythread.java:4728) @ android.app.activitythread.access$1500(activitythread.java:166) @ android.app.activitythread$h.handlemessage(activitythread.java:1343) @ android.os.ha...

codenameone - Side menu transition speed -

how can increase speed of transition between opening or closing of side menu , change duration or speed of form transition (going 1 form another? there theme constant sidemenuanimspeedint defaults 300ms. another constant available forms transitionspeedint defaults 220ms @ time.

c++ - Why head value not "NULL"? -

Image
trying work out linked list problems. stuck basic mistake head value not "null" in createlinklist(). trick missing here . here code. #include <iostream> using namespace std; void createlinklist(struct node**); void showlist(); void insertnode(); struct node{ int data; struct node * next; }; int main() { struct node* head = null; createlinklist(&head); cout<<"inside main function \t"<<head<<endl; return 0; } void createlinklist(struct node **head){ int data; struct node * new_node; cout<<"creating link list ..."<<endl; cout<< "enter data inserted"<<endl; cin >> data; cout<<"inside createlinklist \t"<<head<<endl; if (head == null){ new_node->data=data; new_node->next=*head; *head=new_node; cout<<"element added @ head position"<<endl; } ...

java - Import a specific caption for all videos in my sequence -

i try import caption (date , time stamp) rushes in premiere pro. first, have renamed, script (written in java) i've made, videos creation dates : instance, name of video taken today : 2016-11-13_11-06-44.mp4 (yyyy-mm-dd_hh-mm-ss.mp4). then now, wanna create subtitle file "datetime stamp" each videos ( here example want create without seconds) name format of videos. knows if can directly made in premiere pro, or have create subtitle file (which extention ?) , import (for each video) in premiere ? thanks helping me.

javascript - Change matching words in a webpage's text to buttons -

Image
i trying make chrome extension parses through website looking keywords, replacing keywords buttons. however, when change text image path becomes corrupted. // content script (isolated environment) // have partial access chrome api // todo // consider adding "run_at": "document_end" in manifest... // don't want run before full load // might able via chrome api console.log("scraper running"); var keywords = ["sword", "gold", "yellow", "blue", "green", "china", "civil", "state"]; // match keywords page textx // create necessary buttons (function() { function runscraper() { console.log($('body')); for(var = 0; < keywords.length; i++){ $("body:not([href]):not(:image)").html($("body:not([href]):not(:image)").html() .replace(new regexp(keywords[i], "ig"),"<button> " + keyword...

java - How can we implement Observable.flatMapCompletable? -

for single can that: init { single.just("blah") .flatmapcompletable { updatelocalization() } } private fun updatelocalization(): completable { return textsmanager.getcurrentlocalization() .doonsuccess { _localization = logger.debug("updatelocalization:doonsuccess") } .tocompletable() } and method observable.flatmapcompletable(completable) ? there reason why isn't implemented in rxjava? how can implement on own? for use completable.await() in observable.onnext : textsmanager.eventsbus.observe() .oftype(textsmanager.event.localizationupdated::class.java) .doonnext { updatelocalization().await() } .subscribe()

How do you find out when a Java class was introduced to the Standard Java API? -

how find out when java class introduced standard java api? the javadoc have since tagline, instance on java.util.list : since 1.2 http://docs.oracle.com/javase/8/docs/api/java/util/list.html therefore has been around since java 1.2 (java j2se 1.2)

angular - Insert form-component dynamically -

Image
i want insert dynamically form module/component containing html , formgroup definition. header/footer/buttons (white) same. possible start form-parent (white). <parent-form dynform="dynamicform"></parent-form> the parent/dynamic should able communicate each other, parent in control. if understand correctlythe point, looking angular2 router providing. check routing in official documentation (e.g. https://angular.io/docs/ts/latest/guide/router.html or https://angular.io/docs/ts/latest/tutorial/toh-pt5.html ). i hope helps

javascript - How to load angular module before loading controller using RequireJs, Jasmine, Karma -

i'm trying write unit test angular app, using requirejs, jasmine, karma. @ moment error: "module 'coremodule' not available! either misspelled module name or forgot load it. if registering module ensure specify dependencies second argument." when run app, ok, problem occurs when run unit tests. this "coremodules" code creates new angular module , load controllers: define(['app/modules/core/controllerreferences'], function(references) { var coremodule = angular.module('coremodule', []); require(references, function() { angular.bootstrap(document, ['coremodule']); }); }); and here code of homecontroller: define(['angular'], function() { angular.module('coremodule') .controller('homecontroller', function($scope) { $scope.title = "hello world"; }); }); as mentioned earlier, i'm trying write simple unit test can't load ...

dockerfile - Docker Container Failed to Run -

the dockerfile application follows # tells docker base image start. node # adds files host file system docker container. add . /app # sets current working directory subsequent instructions workdir /app run npm install run npm install -g bower run bower install --allow-root run npm install -g nodemon #expose port allow external access expose 9000 9030 35729 # start mean application cmd ["nodemon", "server.js"] the docker-compose.yml file follows web: build: . links: - db ports: - "9000:9000" ...

c++ - Why am i getting wrong values when performing PE base relocation? -

i trying perform pe base relocation , whole concept, data structures, method , why doing not problem that. days have been trying code work whatever keep getting undefined/wrong relocation types in variable called relocationtype(obviously) , have feeling might getting wrong offsets aswell allthought when checked debugger few bytes off, regardless cause crash. i should inform of relocation types correct, , either image_rel_absolute or image_rel_based_highlow 1 expect, after few loops finds wrong values. not have clue happening, suspect pbaserelocation might few bytes of reason after while. here relocation function: int fixrelocs(dword imagebase, pimage_nt_headers ntheaders, image_base_relocation *reloc, unsigned int size) { pimage_base_relocation pbaserelocation; image_data_directory datadir; pword list; dword delta; dword count; dword *patchaddr; unsigned char* dest; unsigned char* base = (unsigned char*)imagebase; bool ndelta = false; datadir = (image_data_directory)ntheader...

haskell - foldl with (++) is a lot slower than foldr -

why foldl slower foldr ? have list of lists "a" like a = [[1],[2],[3]] and want change list using fold foldr (++) [] it works fine (time complexity o(n)). if use foldl instead, slow (time complexity o(n^2)). foldl (++) [] if foldl folding input list left side, (([] ++ [1]) ++ [2]) ++ [3] and foldr right side, [1] ++ ([2] ++ ([3] ++ [])) the number of computations (++) supposed same in both cases. why foldr slow? per time complexity, foldl looks if scanning input list twice many times foldr. used following computer time length $ fold (++) [] $ map (:[]) [1..n] (fold either foldl or foldr) it's because of how ++ works. note is defined induction on first argument. [] ++ ys = ys (x:xs) ++ ys = x : (xs ++ ys) the number of recursive calls depends on length xs . because of this, in xs ++ ys more convenient have small xs , large ys other way around. note folding on right achieves this: [1] ++ ([2] ++ ([3] ++ ... we have ...