Posts

What is a file based database? -

i enrolled in course relational databases. asked research advantage of file based approach versus relational databases. i find easier understand relational databases having difficulty understanding file based systems. file based systems same storing files on windows hierarchical system, meaning text files stored under folders , directories? plain csv files example of file based system? when refer file-based databases mean databases interact with/update directly (via sql abstraction offered jdbc driver) in essence read/write file directly. example sqlite no, csv comma separated values file allows data saved in table structured format. a "flat file" database allows user specify data attributes (columns, datatypes, etc) 1 table @ time, storing attributes independantly of application. dbase iii , paradox examples of kind of database in cp/m , ms-dos environments, , original filemaker mac o/s example. a relational database takes "flat file" approach ...

How to make a POST REST call asynchronously in Java -

i have tried bunch of libraries make rest post call using httpconnection in java asynchronously. have tried many open source libraries , none of them seems serve purpose. there way in core java. without knowing requirements or expectations: here simple example without proper error handling shows how async http call can done using java 8 public static void main(string ... args) throws interruptedexception, executionexception, timeoutexception { future<object> futureresult = getobjectasync(); object value = futureresult.get(500, timeunit.milliseconds); } public static future<object> getobjectasync() { return completablefuture.supplyasync(() -> dohttpcall()); } static object dohttpcall() { try { httpurlconnection urlconnection = (httpurlconnection) new url("http://example.net/something").openconnection(); urlconnection.setrequestmethod("post"); try (outputstreamwriter out = ne...

React navigation -

i have 2 screens linked via tabbarnavigator : screena : upon pressing button, trigger function this.props.navigation.navigate('screenb', {data: 'test'} whereupon {data: 'test'} params . screenb : navigation page works expected. however, unable access params object - though can see in navigation dispatch log in console. i've looked @ react-navigation api, on link navigation props no avail. suggestions on how can programmatically access params on screenb? edits: my current navigation setup is: stacknavigator other scene drawernavigator another scene tabbarnavigator scenea sceneb when on sceneb, output of console.log(this.props.navigation.state) {key: "sceneb", routename: "sceneb"} . in screenb component, should able access params passed using this.props.navigation.state.params . kinda long, huh? so in case can do: console.log(this.props.navigation.state.params.data , see test !

react native - ListView RenderSectionHeader Will not properly render with a json get or less than 9 -

i new react-native , building small app. have run odd problem. if json length, greater 9 section header not work properly. doing show , hide. have floating button, when pressed hides , in it's place shows input box. when exceed length of 9 section header, not force rendering. manipulate data, feel cheat myself out of learning experience. hopefully, have explained myself clearly. my json data looks this: [{ "id": "0", "service": "haircut" }, { "id": "1", "service": "brian" }, { "id": "2", "service": "cut&shave" }, { "id": "3", "service": "beard trim" }, { "id": "4", "service": "senior citizen haircut" }, { "id": "5", "service": "crew cut" }, { "id": "6", ...

How to design a qps metric monitoring dashboard that work at different granularity? -

how such monitoring dashboard work distributed system? not able think beyond different machines periodically sending time series data central server. how massage data dashboard can display metric data @ minutes, hour, day granularity , between arbitrary window size?

python - Tensorflow report error with the restored training model -

i'm newbie machine learning , tensorflow, using example tutorial source code, model trained , printed accuracy, doesn't include source code export model , variables , import predict new image. so revised source code export model, , create new python script predict using test data set. here source code export training model: mnist = input_data.read_data_sets(flags.data_dir, one_hot=true) print("run here3") # create model x = tf.placeholder(tf.float32, [none, 784], name="x") w = tf.variable(tf.zeros([784, 10]), name="w") b = tf.variable(tf.zeros([10])) y = tf.matmul(x, w) + b saver = tf.train.saver() sess = tf.interactivesession() ... ignore source code cost function definition , train model #after model trained, save variables , y tf.add_to_collection('w', w) tf.add_to_collection('b', b) tf.add_to_collection('y', y) saver.save(sess, 'result') in new python script, try restore model , re-execute y functio...

windows 7 - Why Google Chrome run multiple processes when there is single tab opened? -

Image
it logical run multiple processes when multiple tabs there in google chrome found multiple processes under single tab only. thought thread stuck restarted pc , opened google chrome , found same behavior. using windows 7. chrome has plugins, web apps, rendering engines , others separate processes browser itself. that done if 1 of processes fails, won't affect whole browser, or whole tab, because separate processes too. for example, firefox doesn't have that, instead detects script in page should causing problem , shows dialog if want stop it. in summary: chrome treats these different processes: the browser the browser (yes, again. chrome it's 2 processes) each tab each extension (at least 1 per extension) each web app each plugin each whatever, process, yay! and helps things can run in parallel , that stuff doesn't end crashing whole browser.