Posts

Showing posts from September, 2013

Moving data using firebase's db -

i have pretty basic data structure looks like: festive-tiger +city +brisbane +lat 100 +long 100 what have top element "country" , list of countries , put city underneath each country. added "country" below festive-tiger , under country "australia", "new zealand", etc. festive-tiger +city +country +australia +new zealand but i'm guessing can't drag city beneath "australia". thanks it not possible move node, neither in firebase console nor through of sdks or apis. but can make copy of node , delete original. in ui, can export node clicking three-dotted button @ top of data. import file in new location.

soap - Do I need account-based permissions to initialize an mssoap client from a wsdl file? -

i'm getting error when try use asp.net webservice through mssoap client: "wsdl reader: loading of wsdl file failed hresult=0x80040154 class not registered - client: unanticipated error occured during processing of request.hresult=0x1812040:class not registered." at first thought soap library not registered. when debugged code realized error being raised @ time of reading web service definition (the soap client created). soapclient.mssoapinit "wsdl_url" now, issue occurs when execute code account (as rest of accounts code works pretty well). original client classic asp page i've reproduced problem using vbs script. i run script under several accounts, 1 presents wsdl-reading failure. i've granted reading permissions directory contains asmx file failing account. i've changed physical path of virtual directory webservice hosted general non-particular-profile location c:. ironically application pool identity of web application accoun

php - How can I display on laravel blade name instead of id? -

user can create invitations, , want display user name sended invitation , email got not working invite.php public function user() { return $this->belongsto(user::class); } user.php public function invites() { return $this->hasmany(invite::class); } invitationcontroller.php public function index() { $invites = invite::all(); return view('administrar', compact('invites')); } administrar.blade.php <select class="form-control input-lg"> @foreach ($invites $invite) <option>{{$invite->email}} invitado por {{$invite->user->name}}</option> @endforeach </select> hasmany expects user_id foreign key. (snake case) in case, it's different need tell relationship foreign key have. so relation should this, public function user() { return $this->belongsto(user::class, 'useid'); } or rename foreign key . check documentation

R | Cannot find the cause of this error [Error: object 'EOT' not found] -

my r installation seems corrupted , install/re-install hasn't yielded solutions. r version 3.3.0 (2016-05-03) -- "supposedly educational" copyright (c) 2016 r foundation statistical computing platform: x86_64-apple-darwin13.4.0 (64-bit) r free software , comes absolutely no warranty. welcome redistribute under conditions. type 'license()' or 'licence()' distribution details. natural language support running in english locale r collaborative project many contributors. type 'contributors()' more information , 'citation()' on how cite r or r packages in publications. type 'demo()' demos, 'help()' on-line help, or 'help.start()' html browser interface help. type 'q()' quit r. error: object 'eot' not found [workspace loaded ~/.rdata] any suggestions on error may originating. have tried removing r , re-installing, upgrading packages etc. system | mac os x yosemite you may have inad

winforms - Using mouse to increment and decrement value of the NumericUpDown control in VB.net -

i have numericupdown control in vb.net 2.0 project. when user clicks mouse inside control , drags left or right, want value of control increment or decrement accordingly. the problem having not able capture mouse-move event once mouse pointer inside boundaries of control , mouse button pressed. i've tried overriding onmousemove() event, event fires once when mouse moved on text-box part of numericupdown control. however, event fires continuously when moved on up/down buttons of same control. i still want preserve normal operation of control: able type in value, use , down button change value etc... anyone have suggestions try? thanks! the mouse event goes textbox that's inside nud. can reference controls property, index 1 textbox: public sub new() initializecomponent() addhandler numericupdown1.controls(1).mousedown, addressof nudmousedown addhandler numericupdown1.controls(1).mousemove, addressof nudmousemove end sub this kinda breaks rules

javascript - JS send message on correct input -

i have submit form users using register: <form method="post" action="<?php echo $_server["php_self"]; ?>" name="form" onsubmit="return validate(this);"> <div class="form-group"> <input type="text" id="name" name="name" class="inputs" /><br /> <input type="text" id="email" name="email" class="inputs" /><br /> <input type="password" id="password" name="password" class="inputs" /> </div> <input type="submit" class="btn1" name="register" value="register" /> </form> the js code checking if data entered correctly. if user enters incorrect date js code showing message. want show message when data entered correctly. tried add row if (errors.length < 0) didn't work. js code sends me messa

java - Custom adapter crash my app (NullPointerException) I'v tried every thing? -

i have been unable fix error; created new project , same result (nullpointerexception) my adapter class: public class contactadapter extends arrayadapter<contactsobject>{ private context context; private list<contactsobject> contactslist; public contactadapter(context context, list<contactsobject> list){ super(context,r.layout.ctninforow,list); this.context=context; this.contactslist=list; } public class viewholder{ textview tvname,tvemail,tvphone; public viewholder(view v){ textview tvname=(textview) v.findviewbyid(r.id.ctnname); textview tvemail=(textview) v.findviewbyid(r.id.ctnemail); textview tvphone=(textview) v.findviewbyid(r.id.ctnphone); } } @override public view getview(int position, view convertview, viewgroup parent) { viewholder myholder=null; if (convertview == null){ layoutinfl

jquery - I have a horizontal scroll with overflow hidden, how do i make it scroll to the center when i click it? -

i want make when click on each number, number scroll center of container. here's got far in jsfiddle. https://jsfiddle.net/bf3nv33d/2/ here codes.. html <div id='container'> <div id='scrollbox'> </div> <div id='display'> </div> </div> css #container{ border:1px solid blue; height:200px; width:200px; } #scrollbox{ height:43px; overflow-x:scroll; overflow-y:hidden; white-space:nowrap; } .numberbox{ display: inline-block; background-color: white; padding: 2px 2px 2px 2px; width:20px; border-right:1px solid green; } jquery for(var i=1; i<21; i++){ var numberbox = "<div class='numberbox numberbox"+i+"'>"+i+"</div>"; $('#scrollbox').append(numberbox); } $('.numberbox').on('click', function(){ $('.numberbox').css('background-color', 'white'); $(this).css('background-color

aggregation framework - Three Way Many-to-Many in MongoDb -

i have seen plenty of examples on internet , answers on over various ways establish many-to-many relation between 2 entities. example of users , roles used. problem quite straight forward , simple understand me has 2 months experience mongodb , half of time has been spent fighting against rdbms schema patterns aren't necessary in mongodb. however, little lost trying establish 3 way many-to-many relation seems straight forward in rdbms world i'm unable think through how done in mongodb. here's example. let's have 3 entities: project , user , projectrole . each user can have multiple projects , each project can have multiple users . each user can have multiple projectroles , each projectrole can have multiple users . another condition projectroles can assigned users in relation project . is, users can't have projectrole if they're not part of project . similarly, projectroles related projects via users . so there ways have thought

python - How to resolve : Very large size tasks in spark -

here pasting python code running on spark in order perform analysis on data. able run following program on small amount of data-set. when coming large data-set, saying "stage 1 contains task of large size (17693 kb). maximum recommended task size 100 kb". import os import sys import unicodedata operator import add try: pyspark import sparkconf pyspark import sparkcontext except importerror e: print ("error importing spark modules", e) sys.exit(1) def tokenize(text): resultdict = {} text = unicodedata.normalize('nfkd', text).encode('ascii','ignore') str1= text[1] str2= text[0] arrtext= text.split(str1) ss1 = arrtext[0].split("/") docid = ss1[0].strip() docname = ss[1].strip() resultdict[docid+"_"+docname] = 1 return resultdict.iteritems() sc=sparkcontext('local') textfile = sc.textfile("path data") filecontent = textfile.flatmap(tokeni

How to use concat in puppet for combining two files into same file? -

define nagios::iconf( $host_name='', $ip='', $short_alias='',$service_name='',$remote_host_name='',$port=''){ $reconfigure = "/usr/local/nagios/etc/import/${host_name}.cfg" concat{$reconfigure: owner => nagios, group => nagios, mode => 755 } concat::fragment{"hosttemplate": target => $reconfigure, source => template('nagios/host.erb'), order => 01, } concat::fragment{"servicetemplate": target => $reconfigure, ensure => template("nagios/${service_name}.erb"), order => 15 } } include nagios when declare in site.pp node "blahblahhostname"{ nagios::iconf{'name1': host_name => 'localhost' remote_host_name => 'blahblah1', ip => '32.232.434.323', port => '111', short_alias => 'random',

proxy - Integrate Fiddler With Selenium RC To Capture HTTP Headers -

i'm trying use fiddler 4.6.2.3 proxy selenium rc (the standalone server .jar file v2.53.0) in firefox instead of selenium rc's built-in proxy. i'm doing because want take advantage of fiddler's capabilities. have fiddler working correctly firefox both http , https. have selenium rc working correctly "*firefox" profile using standalone selenium rc server .jar file. what i'd replace selenium's built-in proxy fiddler. i launching both fiddler , selenium rc same .bat file. launch fiddler first, launch test suite using selenium rc standalone server. when remark out fiddler launch in .bat file, selenium rc test suite executes perfectly. when launch fiddler, launch selenium rc test suite (both .bat file), selenium rc complains fiddler's security certificate problem , selenium rc test suite fails. i'm new world of automated testing , selenium. i've tried using selenium rc command line option -avoidproxy see if selenium rc somehow &

linux - suspend a shell command without pid -

i need $command & stop should execute command , suspend it. application later resumes command complete results. i understand job can suspended stop signal corresponding pid. $kill -sigstop 12753 when execute command, barely know pid. there command involved take pid , required. want avoid command , time interval. basically application measure of network performance. trigger commands put them in halt mode. halted commands resumed per kind of traffic needed. the process id of started background command available in shell parameter $! : $ command & kill -sigstop $! (check documentation shell's implementation of kill correct format.)

windows - Add Github remote to GitKraken -

Image
i'm using gitkraken (v. 1.4.1) git managing tool. , want use github remote repos. when click on add remote , try add github repo, says 'no match' does know why happens? (btw: i'm using windows 10, in case that's relevant) if github set account in gitkraken, might need create first empty repo same name local repo. that way, gitkraken can find matching repo name in github account. or select " url ", , enter right github repo url directly there. jim meyer 's answer confirm below.

twitter bootstrap - dropdown menu not operate after modal open(remote) -

dropdown menu not operate after modal open(remote) however, if open modal once again work dropdown menu again. bootstrap version 3.3.6(latest version) and general modal opening not problem. remote method modal opening problem. this html code function openmodal(review_id) { $("#mymodal").modal({ remote: '/review' }); } <!-- dropdown menu section --> <div class="gnb-section" style="width: 1440px; margin: auto"> <ul class="gnb"> <li class="dropdown main{{ main_active }}" role="menu"> {% if topic == "it" %} <a href="#" class="dropdown-toggle" data-toggle="dropdown">get review</a> {% endif %} <ul class="dropdown-menu"> <li><a href="#"><span class="badge pull-right">2</span>menu1-1</a></li> <

ruby on rails 4 - Verify user authenticated for actions -

i'm using devise , want check in specs controller actions covered authenticate_user! i've looked on devise docs, feel there's simple , obvious i'm not getting way devise works. based on this post built spec check this, doesn't seem working. when run spec, get: failure/error: expect(controller).to receive(:authenticate_user!) (#<librariescontroller:0x000001035639f8>).authenticate_user!(*(any args)) expected: 1 time arguments received: 0 times arguments libraries_controller_spec.rb require 'rails_helper' rspec.describe librariescontroller, type: :controller let(:valid_attributes) { skip("add hash of attributes valid model") } let(:invalid_attributes) { skip("add hash of attributes invalid model") } let(:valid_session) { {} } describe "get #index" "should authenticated" :index, {} expect(controller).to receive(:authenticate_user!) end

React Native render not being triggered after Redux action is dispatched -

i'm having issue, action being dispatched, reducer being executed render function not being triggered. container: import react, { component } 'react'; import { bindactioncreators } 'redux'; import { connect } 'react-redux'; import { rendervotersearch } '../actions'; import search '../components/search'; class searchcontainer extends component { render() { return ( <search {...this.props}/> ); } } const mapstatetoprops = (state) => { return { searchtype: state.searchtype, instruction: state.instruction, title: state.title } } const mapdispatchtoprops = (dispatch) => { return bindactioncreators({ rendervotersearch }, dispatch); } export default connect(mapstatetoprops, mapdispatchtoprops)(searchcontainer); the action dispatched search component export const rendervotersearch = (tab) => ({ type: render_voter_search, searchtype:

streaming - reactive-kafka with default dispatcher? -

i'm working in project kafka , akka streams using reactive-kafka connector. have found reactive-kafka use it's own dispatcher (akka.kafka.default-dispatcher) if, instance of that, use default akka dispatcher, faster (reactive-kafka dispatcher ~300 messages/s, default dispatcher ~1300 messages/s ) i wonder if use default dispatcher safe. thanks in advance.

android - Having trouble on firebase fetching data and display in Textview......, -

i have been working on code several days,first thought database reference has problem,getref working,so little bit confused because datasnap returns null....,it working before updated database reference..., intent = getintent(); final string key = i.getextras().getstring("firekey"); log.d("inter", key); // initialize database query queryref = firebasedatabase.getinstance().getreference() .child("reports").orderbykey() .equalto(key); string dd=queryref.tostring(); log.d("query", dd); queryref.addchildeventlistener(new childeventlistener() { @override public void onchildadded(datasnapshot datasnapshot, string s) { log.d(tag, "onchildadded:" + datasnapshot.getref()); map<string, object> newpost = (map<string, object>) datasnapshot

php - If statement is working whereas Else statement does not work -

<?php // check connection $servername = "localhost"; $username = "root"; $password = "1234"; $dbname = "project"; htmlspecialchars($a = $row1['stno']); $d1 = $row7['userid']; // create connection $conn = new mysqli($servername, $username, $password, $dbname); // check connection if ($conn->connect_error) { die("connection failed: " . $conn->connect_error); } $sql = "select * likes rec = $a"; $result = $conn->query($sql); if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { $z4 = $row['do']; if ($d1 == $z4) { include ("unlikee

How to unmarshal this type of xml in java -

i new rest api. have xml output need unmarshal. below xml output: <dsml> <entries> <entry dn="uid=7686,c=in,ou=pages,o=example.com"> <att name="uid"> <value>7568766</value> </att> <att name="email"> <value>new@gmail.com</value> </att> <att name="callname"> <value>john</value> </att> </entry> <entry dn="uid=7689,c=in,ou=pages,o=example.com"> <att name="uid"> <value>7678766</value> </att> <att name="callname"> <value>mike</value> </att> </entry> <entry dn="uid=7690,c=in,ou=pages,o=example.com">

html - jQuery text effect not rendering with individual letters -

i trying take h1 says "hello world", , using lettering.js(see below), break h1 series of spans can change colors of letters individually make rainbow effect. want use jumble text effect found here: http://cozuya.github.io/texteffect-jquery-plugin/ . here link lettering plugin: https://github.com/davatron5000/lettering.js . essentially happens is, colors changed, letters not jumble, , colors revert white after few moments. i've tried using .delay() before lettering call, putting 1 in script before other, nothing seems these 2 plug ins work together. this h1 "hello world" after .lettering called: <h1 id = "letters"> <span class="char1">"</span> <span class="char2">h</span> <span class="char3">e</span> <span class="char4">l</span> <span class="char5">l</span> <span class="char6">o</span> &

javascript - Improve this recursive search with Regex -

i'm trying improve part of code using regex rather regular replace, clean string submit solr's client. string.prototype.replacearray = function(find, replace) { var replacestring = this; (var = 0; < find.length; i++) { replacestring = replacestring.replace(find[i], replace[i]); } return replacestring; }; var match = [ '\\', '+', '-', '&', '|', '!', '(', ')', '{', '}', '[', ']', '^', '~', '*', '?', ':', '"',

c - Creating table for Fibonacci Sequence -

thank in advance. appreciate , feedback. new programming , working on assignment prints fibonacci sequence based on how many numbers user asks for. have of code complete, there 1 remaining piece having difficulty with. output in table format, off code , not getting of data in output. in grey code, output, , desired output. #include <stdio.h> #include <stdlib.h> int main() { int i, n; int sequence = 1; int = 0, b = 1, c = 0; printf("how many fibonacci numbers print?: "); scanf("%d",&n); printf("\n n\t\t fibonacci numbers\n"); printf(" %d \t\t\t%d\n \t\t\t%d\n ", sequence, a, b); (i=0; <= (n - 3); i++) { c = + b; = b; b = c; sequence++; printf("\t\t\t%d\n ", c); } return 0; } here output: how many fibonacci numbers print?: 8 n fibonacci numbers 1 0 1 1 2 3 5 8 13 here desired output: h

web services - ADMA0002E: A validation error occurred in task Binding enterprise Bean to JNDI -

while installing current package, following error messages received: wasx7017e : exception received while running file /opt/install_sipr/updatesiprear.py ; exception information: com.ibm.ws.scripting.scriptingexception: wasx7108e: invalid data specified install task: "bindjndiforejbnonmessagebinding." errors are: " adma0002e : validation error occurred in task binding enterprise bean jndi names. java naming , directory interface (jndi) name not specified enterprise bean dqevalpersistservice in module gfmejb. adma0002e : validation error occurred in task binding enterprise bean jndi names. java naming , directory interface (jndi) name not specified enterprise bean jumservice in module gfmejb." the messages associated following statement: adminapp.update(appname, 'app', '[ -operation update -contents ' + earfilename + ' -noprecompilejsps -installed.ear.destination $(app_install_root)/' + cell + ' -distributeapp -nousemetadata

erlang - Failed to Create Cookie file RabbitMQ in Windows -

i trying run following command rabbitmq-plugins.bat enable rabbitmq_management and giving me error failed create cookie file h:/ . i using windows 7, erlang version r16b01 , rabbitmq-server version 3.1.5 i using work pc , our corporate policy sets homedrive h: , homepath / , dont think let me change this. i can see .erlang.cookie file under c:\windows. could let me know of workaround ? thanks in advance ! had same h: problem. set home drive dir in dos shell before executing cli. set homedrive=c:/premuser rabbitmq-plugins.bat enable rabbitmq_management

javascript - Error using Ionic framework for weather app -

i building weather app using ionic , it's done. have problem wind bearing, in json data have degrees wind direction , have use code it's not showing in current .. $scope.windbearing = function(windbearing) { if (windbearing < 11.25 && windbearing > 348.75) return '<img alt="" class="center-block" src="http://meteoiraq.com/img/n.png"style="width: 60px;"><h4 class="text-center">الرياح شمالية</h4>'; else if (windbearing > 11.25 && windbearing < 33.75) { return '<img alt="" class="center-block" src="http://meteoiraq.com/img/nne.png"style="width: 60px;"><h4 class="text-center">الرياح شمالية شمالية شرقية</h4>'; } else if (windbearing > 33.75 && windbearing < 56.25) { return '<img alt="" class="center-block" src="

arrays - Java vector resizing could be problematic like in C++? -

if have, example, hashmap of type: hashmap<string,arraylist<integer> > tag_posizioni; tag_posizioni.put( "a",new arraylist<integer>() ); tag_posizioni.get("a").add(3); so, have resized arraylist associated a tag; so, have new vector in different memory zone; next tag_posizioni.get("a") could throw memory error (because reference pointing not valid memory zone) or jvm manage automatically situation changing reference? more sure doing arraylist<integer> pos=tag_posizioni.get("a"); pos.add(3); tag_posizioni.put("a", pos); or useless? there nothing wrong code, when call: tag_posizioni.get("a").add(3); then tag_posizioni.get("a") returns reference object on add(3) called. object (arraylist) changes internal data structures, internaly not known - encapsulated. statement true if able somehow take reference internal data structure (which private prevent doing this).

Error during composer.phar self-update (Symfony) -

someone can explain me why when run: php composer.phar self-update i receive error? php fatal error: cannot redeclare class symfony\component\console\output\streamoutput in phar:///users/oscar/sites/gamempire/git/composer.phar/vendor/symfony/console/symfony/component/console/output/streamoutput.php on line 32 php stack trace: php 1. {main}() /users/oscar/sites/gamempire/git/composer.phar:0 php 2. require() /users/oscar/sites/gamempire/git/composer.phar:15 php 3. composer\console\application->run() phar:///users/oscar/sites/gamempire/git/composer.phar/bin/composer:43 php 4. symfony\component\console\application->run() phar:///users/oscar/sites/gamempire/git/composer.phar/src/composer/console/application.php:83 php 5. composer\console\application->dorun() phar:///users/oscar/sites/gamempire/git/composer.phar/vendor/symfony/console/symfony/component/console/application.php:121 php 6. composer\autoload\classloader->loadclass() phar:///users/oscar/sites/ga

angularjs - Unable to get the resolved attributes within custom directive -

i have been trying write custom directive input field dynamic id, in directive unable correct id. <input id="myinput{{$index}}" my-dir="fn()"/> myapp.directive('mydir', function ($parse) { var obj = { require: "ngmodel", link: { post: function (scope, element, attrs) { var fn = $parse(attrs.mydir); var elementid = element.attr('id'); console.log(elementid); // here see myinput{{$index}} instead of myinput0, time angular not resolving value } } }; return obj; }); my question be, how can resolved value in directive. cannot use isolated scope here due other reasons. thanks in advance you can use $observe observe value changes of attributes contain interpolation (e.g. src="{{bar}}"). not efficient it's way actual value because during linking phase interpolation hasn't been evaluated y

android - App build.gradle error -

Image
this happening after launched avd app test, , starting android os. few seconds later, computer( using mac) restarted causing error android studio. after happening, android studio strange. it working well, happened. android studio not still work after used clean project ,and can't recognize things such r. , methods. thank :) i attached screenshot understanding. your styles.xml error. have fix , clean project. think trying add appcompat project. did add following line in dependencies? compile 'com.android.support:appcompat-v7:23.1.1'

ios - UITextField in UITableViewController -

Image
i can't find question this. searched of internet nobody ask question. apple's tutorials, there no example. here want do. want create app reminders or wunderlist. want emphasize uitextfield of uitableviewcell's first cell text input. first cell static cell uitextfield , other cell's results of uitextfield. example: static cell (uitextfield) dynamic cell (label) dynamic cell (label) ... there no button uitextfield. want input keyboard's return reminders.app due must implement uitextfielddelegete , equalize in viewdidload textfield.delagate = self . problem starts here. can connect outlets in uitableviewcell (for uitextfield , cells' labels) in uitableviewcell's instance method, there no viewdidload method , disallow use uitextfielddelagete can require input without using button. if use viewcontroller (not uitableviewcontroller), can connect outlets , use uitextfielddelegate. how can solve problem? point missed? please check screenshot how

jQuery: Firefox does not recognize dblclick()! -

last few months tried develop web application running js, jquery , php , tricks found here (thanks) , scripts tested using chrome. say, worked until decided change testing browser. decided ff v. 47 , expected works fine saw in gc not! firefox doesn't recognize dblclick() on cell of dynamically created table. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script> <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> "troublemaker" code: $("#mytable").on("dblclick", "tr", function(e) { var idcel = $(event.target).attr('id'); var idrow = $(e.currenttarget).attr('id'); console.log('you clicked row id= '+idrow); console.log('id of clicked cell is: ' +idcel); //... }); }) is me or ff has d

javascript - how to display individual values within JSON array angualrjs -

i have json file named (for now) 0.json. want display arrays within json object individual values (maybe display them badges). here json: [ { "id": "chinwe chukuwogu roy wordpress biography website", "name": "chinwe roy biography website", "practices": ["ux", "html wireframing", "front-end development", "custom wordpress theming"], "technology": ["wordpress", "html", "css", "jquery", "tweenmax", "inkscape", "photoshop"], "time": "6 weeks", "description": "a biography website celebrating work of world reknowned artist, chinwe chukwogu roy", "images": "../assets/img/ux.svg", "header": "../assets/img/wordpress-project.svg", "behance": "https://www.behance.net/gallery/33173663/ui-desi

Java Thread : Multithreading - Race condition -

i writing multi-threading program can accessed multiple user simultaneously , program has avoid race conditions. code / multi-threading : public class dataprocessor implements serializable, runnable { private static final long serialversionuid = 1l; public dataprocessor() { } @override public void run() { process(); } private void process() { int isize = 5; (int icounter = 0; icounter < isize; icounter++) { datakey objdatakey = new datakey(); arraylist<string> list = //..fetch data method () hashmap<string, string> hmpqdata = //..fetch data method () sendnforgothelperthread helperthread = new sendnforgothelperthread(objdatakey, list, hmpqdata); thread t = new thread(helperthread); t.start(); } } class sendnforgothelperthread implements runnable { private arraylist<string> list; private hashmap<string, string> hmpqdata; private datakey objdatakey; public sendnfo

java - How to split string separated by | character -

i have input string in following format first|second|third|<forth>|<fifth>|$sixth want split string array of string value [first,second,third,,,$sixth]. using following code split string not working. please me. public string[] splitstring(string input){ string[] resultarray = input.split("|") return resultarray; } could please tell me doing wrong. you need escape | using backslash special character. should work: string[] resultarray = input.split("\\|")

java - Reading data from Azure Blob with Spark -

i having issue in reading data azure blobs via spark streaming javadstream<string> lines = ssc.textfilestream("hdfs://ip:8020/directory"); code above works hdfs, unable read file azure blob https://blobstorage.blob.core.windows.net/containerid/folder1/ above path shown in azure ui, doesnt work, missing something, , how can access it. i know eventhub ideal choice streaming data, current situation demands use storage rather queues in order read data blob storage, there 2 things need done. first, need tell spark native file system use in underlying hadoop configuration. means need hadoop-azure jar available on classpath (note there maybe runtime requirements more jars related hadoop family): javasparkcontext ct = new javasparkcontext(); configuration config = ct.hadoopconfiguration(); config.set("fs.azure", "org.apache.hadoop.fs.azure.nativeazurefilesystem"); config.set("fs.azure.account.key.youraccount.blob.core.windows.n

assembly - .NET JIT compilation naivety -

i have 3 years experience working full time .net (c# , vb). have working knowledge of msil , can use debugging tool. i don't have knowledge of next step of compilation process i.e. when jitter produces assembly code (displayed in dissassebly window). hans passant posted answer question here: what difference between native code, machine code , assembly code? . more experienced colleague said brilliant answer, still don't understand following code: static void main(string[] args) { console.writeline("hello world"); 00000000 55 push ebp ; save stack frame pointer 00000001 8b ec mov ebp,esp ; setup current frame 00000003 e8 30 03 6f call 6f03be38 ; console.out property getter 00000008 8b c8 mov ecx,eax ; setup "this" 0000000a 8b 15 88 20 bd 02 mov edx,dword ptr ds:[02bd20

Data migration process within SQL server -

i have requirement this. step 1 : need retrieve access db's data sql server database.i have done using ssms's import wizard tool.i have given database name legacydata step 2 : need insert legacy data new sql server database called appdata . note : names of tables , column names different on 2 databases. as e.g. on legacydata database has table name homeowner foreclosures .the mapping table's name of appdata database properties . columns : homeowner foreclosures : plid,deeddate,county properties : id,deeddate,countyid note : here county name of counties master table , countyid id of counties table.i have mapping here also. counties : id,name can tell me how kind of data migration process ? i think looking for. use appdata insert properties select h.plid, h.deeddate, c.countyid legacydata.dbo.homeownerforclosure h join legacydata.dbo.counties c on h.county = c.name

Simple Newsletter Signup form PHP -

i have simple "newsletter signup" form .php script trying edit. i want script work @ moment without "name" input box. i want "email" input box, message if email not valid , response if submission successful. the .php doc writing .txt file on server. my index.html <!doctype html> <html> <head> <title>form</title> <meta charset="utf-8" /> <link rel="stylesheet" type="text/css" href="css/main.css" /> <script src="prototype.js" type="text/javascript"></script> <script type="text/javascript" language="javascript"> function trim(str){str = str.replace(/^\s*$/, '');return str;} function signup() { var email = trim($f("email")); var name = trim($f("name")); //email validation var goodemail = email.match(/\b(^(\s+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.