Posts

Showing posts from July, 2011

html - How do I create a PHP function to output values from different variables when called? -

i have different variables arrays different values. need display values of each array item in html, know how do. problem is, need find percentage of values of each array item in relation themselves. equation like: blue balls percentage = blue balls / sum of array items * 100 i'm way use function in order echo results of each array item through equation, have no idea how write it. this arrays: $balls = array( 'red' => 5, 'blue' => 7, 'green' => 2 ); $socks = array( 'red' => 5, 'blue' => 7, 'green' => 2 ); this think html should like: blue balls make up<?php echo $percent($ball['blue']); ?>% of balls. there <?php echo $balls['blue']; ?> blue balls. i'm trying achieve final result: blue balls make 50% of balls. there 7 blue balls. i know bottom echo valid, have no idea how attempt write function top echo, or if echo possible. <?ph

html - how to customize the bootstrap navigation hover size -

Image
i trying customize bootstrap navigation bar. here part of code change hover style: .navbar-nav > li > a:hover { background-color: #0075a0 !important; } .navbar-nav > li > { padding: 15px; border-radius: 5px !important; } but currently, not sure how customize hover size of navigation bar. default, hover's height same of bootstrap navigation bar, how make shorter? like following image shows:

Cannot resolve :spring-securty-core:2.0-RC3 in grails 2.3.8 -

i trying add spring security core grails project in groovy grails toolsuite when tried compile it, gives me below error. starting process on thbknb750/10.10.104.32 loading grails 2.3.8 |configuring classpath error | resolve error obtaining dependencies: failed read artifact descriptor org.grails.plugins:spring-security-core:zip:2.0-rc3 (use --stacktrace see fulltrace) error | resolve error obtaining dependencies: failed read artifact descriptor org.grails.plugins:spring-security-core:zip:2.0-rc3 (use --stacktrace see full trace) error | resolve error obtaining dependencies: failed read artifact descriptor org.grails.plugins:spring-security-core:zip:2.0-rc3 (use --stacktrace see full trace) error | resolve error obtaining dependencies: failed read artifact descriptor org.grails.plugins:spring-security-core:zip:2.0-rc3 (use --stacktrace see full trace) error | failed read artifact descriptor org.grails.plugins:spring-security-core:zip:2.0-rc3 |run 'grails dependency-report'

Conversion from mysql to mysqli not working -

i in process of converting existing mysql mysqli but can't piece of code correct mysql_query("insert `sendmsg`(`sendname`, `recievename`, `subject`, `body` , `mdate`, `mtime`) values ('$sendname','$recievename','$subject','$body','$msgdate','$msgtime')"); $new_id = mysql_insert_id(); mysql_query("insert `recievemsg`(`msgid`, `sendname`, `recievename`, `subject`, `body`, `mdate`, `mtime`, `status`) values ($new_id,'$sendname','$recievename','$subject','$body','$msgdate','$msgtime','unread')"); what tried given below didnt work $mysqli->query("insert `sendmsg`(`sendname`, `recievename`, `subject`, `body` , `mdate`, `mtime`) values ('$sendname','$recievename','$subject','$body','$msgdate','$msgtime')"); $new_id = mysqli_insert_id(); $mysqli->query("insert `recievemsg`(`msgid`, `sendn

android - images not appearing in gridView but after keyboard actived -

i have 2 activites,transporting arraylist imageurls activity addproductactivity activity sdcard. sdcard.java code is: public class sdcard extends activity { private arraylist<string> imageurls; private displayimageoptions options; private imageadapter imageadapter; imageloader imageloader; @suppresswarnings("deprecation") @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_photoalbum); getactionbar(); getactionbar().sethomebuttonenabled(true); getactionbar().setdisplayhomeasupenabled(true); getactionbar().setdisplayshowtitleenabled(true); getactionbar().settitle("select image"); final string[] columns = { mediastore.images.media.data, mediastore.images.media._id }; final string orderby = me

css3 - Crawler Friendly CSS Ribbons -

i have working 'css ribbon tag' however, html ugly: <div class="tag-holder"> <div style="position:relative"> <div class="triangle"> <span>classic</span> </div> </div> <div style="position:relative"> <div class="triangle"> <span>open-assets</span> </div> </div> <div style="position:relative"> <div class="triangle"> <span>open-music</span> </div> </div> </div> </div> in have define 'tags' wrapped 2 divs wrapped tag-holder div. problematic crawlers/screen readers hard read. what css use have m

php - Unable to Store Base64 Data in MySql Database -

i trying store base64 string mysql database using php. here code. <?php //store image $photodata = $_post['photodata']; //database connection details $db_url = "192.168.1.140"; $db_user_name = "easyblogadmin"; $db_password = "admin"; $db_name = "easyblog"; $con = mysqli_connect($db_url, $db_user_name, $db_password); $sql = "insert temptable (photodata) values('$photodata')"; if(mysqli_connect_errno()){ echo "failed connect database"; echo mysqli_connect_errno(); die(); } else { //connecting application database $db_selected = mysqli_select_db($con, $db_name); if(!$db_selected){ echo "failed connect application database"; die(); } else { if (!mysqli_query($con,$sql)) { die('error: ' . mysqli_error($con)); } mysqli_close($con); echo "

ruby on rails 4 - undefined method `attr_accessible' with Mongoid -

i using rails 4.1.1, ruby 2.1, mongodb, mongoid wrapper, rails_admin creating admin interfaces i know 'attr_accessible' no longer works rails4. have installed 'protected_attributes' gem. still no success still getting warning in console [railsadmin] not load model company, assuming model non existing. (undefined method `attr_accessible' company:class) so, rails admin not load class company because have defined attr_accessible in model. here company model. class company include mongoid::document @@employees_strength = {0 => '0-10', 1 => '11-50', 2 => '51-100', 3 => '101-500', 4 => '501-1000', 5 => '1000+', 6 => '5000+'} field :name, type: string field :website, type: string field :domain_name, type: string field :strength, type: integer has_many :employees has_one :admin, :class_name => 'employee', :dependent => :destroy,

How to increase max_execution_time in PHP -

i want increase max_execution time site. have tried methods out success , need help. what tried: i set site in sub-folder have create php.ini folder , along set max_execution_time=259200 in code file set set_ini('max_execution_time','259200') i set root php.ini max_execution_time how can set max_execution_time cpanel server? what done: change php.ini increase max_execution_time = 2592000 add set_ini('max_execution_time','2592000'); in script file in starting of file add set_time_limit(2592000); in script file in starting of file concern host provider due shared server support doesn't work you can set limit set_time_limit() http://www.php.net//manual/en/function.set-time-limit.php but can change if admin of hosting server has allowed so. you can shoot them email , ask want or if don't allow it, change code executable chunks each run couple sec(or less) , loop calls of them. depending on application done n

asp.net mvc 4 - HttpPost action method recalled when the view presented by it is reloaded -

i have httppost action method receives model , saves database: [httppost] public actionresult adddocument(document doc){ documentrepository repo= getdocumentrepository(); repo.savedocument(doc); return view(viewname: "docviewer", model: doc); } so method receives model, saves , returns docviewer view display added document. have 2 problems including 1 in question if press f5 after docviewer presented warning post method invoked again. how avoid this? i'm sure there's general practice in docviewer view have defined html elements this: <div>full name</div> <div>@html.labelfor(x=>x.fullname)</div> <div>address</div> <div>@html.labelfor(x=>x.address)</div> //and on but following output: full name fullname address address shouldn't actual value not property name (or display name if it's provided)? in post action not return model object view: [httppost] public action

How to display user Cover photo in Facebook as the image for UIImageView in iOS -

Image
i new in ios dev., i'm trying display cover photo of facebook in uiimageview. read facebook graph api couldn't done. is there site explains or gives example on how , display cover photo of fb in ion uiimageview. i want display this: this facebook graph api explorer

delphi - Insert different Picture object after each row print in Fast Report -

i developing application in firemonkey (delphi xe5) using fast report 4 printing data. using tfrxuserdataset keep data , print this, using masterdata band in fast report. now, need print tbitamp each row, here bitmap each record different. does body has idea how can this? Нou can load external image file picture control in report. i'm doing script part of report using onbeforeprint event follows: procedure data2onbeforeprint(sender: tfrxcomponent); var lfn : string; lfp : string; begin // use filename found in media dataset fields lfp := trim(< media."imagepath">); // images folder below image root path lfn := trim(< media."filename1">); // actual image file name picture2 begin // nb: there no checking in example, may useful // couple of checks before trying load image, if // data user entered loadfromfile(imagerootpath + includetrailingslash(lfp) + lfn);

node.js - How to define a single reference schema using mongoose -

i new in node.js , mongodb , in below code define reference in table employee of department here when insert or data employee table in array format want define reference single column not multiple . var employee = new mongoose.schema({ name: string, dept: [department] }); var department = new mongoose.schema({ dept_name : string, dept_code : string }) i want data in response employee table in format `{"name":"cs",dept:{"id":_id_of_dept}} please guide me correct way achieve objective. you can nest using references or arrays, in example, can either create department record , reference in employee document, or have array of department s employee (which understand not want do). to reference department document employee use like: var department = new mongoose.schema({ dept_name : string, dept_code : string }); mongoose.model('department', department); var employee = new mongoose.schema({ nam

c++ - LoadBitmap fails ERROR_RESOURCE_NAME_NOT_FOUND -

i have bitmap defined in resource.h , .rc file: #define idb_bitmap1 130 idb_bitmap1 bitmap discardable "bitmap1.bmp" when try load with hbmp = loadbitmap(0, makeintresource(idb_bitmap1)); it fails, , getlasterror() returns 1814 (or 0x716 in hex), stands error_resource_name_not_found. bitmap there. because of hinstance? thought 0 works if resource in .exe, , is. it mistake pass 0 instance. documentation says: an application can use loadbitmap function access predefined bitmaps. so, application must set hinstance parameter null , lpbitmapname parameter 1 of following values. ...... table removed ...... you not loading predefined bitmap , need pass instance handle contains resource.

ruby on rails - How to pass different arguments in rake multitask -

i want pass different arguments every method , need run methods parallel using rake task here rake task calling example rake::task['test:sync'].invoke(user.id, user.address) rake::task['test:sync'].invoke(user.id, user.address) rake::task['test:sync'].invoke(user.id, user.address) i have seen multitask example multitask :copy_files => [:copy_src, :copy_doc, :copy_bin] puts "all copies complete" end here calling task name alone. in case want pass task name parameters . how can achieve it. extract functionality own method ( foo ) , dynamically declare rake tasks arguments ( arg1 , arg2 ) baked task name itself. declare multitask , invoke it. calls foo run in parallel. def foo(arg1, arg2) thread_id = thread.current.object_id.to_s[-4..-1] 10.times |i| sleep rand puts "[#{thread_id}] (#{arg1}) (#{arg2}) (#{i})" end end task :parallel_foos arg1s = (1..4).map { sprintf('%.4f', rand) } arg2

java - Use radio button instead of drop down/OptionsCollection -

i need modify code "male" , "female" displayed , selected radio buttons instead of using optionscollection/drop down? here code being used currently <html:select property="gender"> <html:optionscollection property="genderlist" label="label" value="value"/> </html:select> in file, there code public void reset(actionmapping mapping, httpservletrequest request) { setgender(null); setgenderlist(null); arraylist glist = new arraylist(); glist.add(new labelvaluebean("male", "male")); glist.add(new labelvaluebean("female", "female")); setgenderlist(glist); } public string getgender() { return gender; } public void setgender(string gender) { this.gender = gender; } public arraylist getgenderlist() { return genderlist; } public void setgenderlist(arraylist genderlist) { this.genderlist = genderlist; } i thi

glsl - what is the difference between querying time elapsed in OpenGL with GL_TIME_ELAPSED and GL_TIMESTAMP -

both of them can used time elapsed in nanoseconds. former uses scoped glbeginquery/glendquery. difference? is difference? you though minor difference. gl_time_elapsed delivers gpu time took process commands in query's scope (ie: glbegin/end ). gl_timestamp not count of anything. merely gets time, in nanoseconds, since... well, something. start time implementation defined, increasing (unless overflows). to put way, gl_time_elapsed stopwatch: time between when start , stop. it's delta. gl_timestamp looking @ clock: it's increasing. it's absolute time, it's relative implementation dependent.

javascript - Onclick event issue after using the outerHTML -

this html code : <div > <div class="incasari"> <div class="data_incasare_container"> <label><b>data</b></label> <input class ="data_incasare" type="text" id="datepicker"> <label class ="data_incasare_hidden">12-06-2014</label> </div> <div class="suma_incasare_container" style=""> <label><b>suma</b></label> <input class="suma_incasare" type="text" maxlength="8" name="pret_unitar[]" alt=""> <label class ="suma_incasare_hidden">100</label> </div> <div class="coscos" style="">

validation - check for empty value in php -

i checking value see if empty using empty() function in php. validates following empty: "" (an empty string) 0 (0 integer) 0.0 (0 float) "0" (0 string) null false array() (an empty array) $var; (a variable declared, without value) the value passing can string, array or number. if string has space ( " " ) not considered empty. easiest way check condition without creating own function? cannot empty(trim($value)) since $value can array . edit: not trying ask how check if string empty. know that. asking if there way can pass array, number or string empty() , return correct validation if string passed has empty spaces in them. the best way create own function, if have reason not can use this: $original_string_or_array = array(); // variable want check $trimed_string_or_array = is_array($original_string_or_array) ? $original_string_or_array : trim($original_string_or_array); if(empty($trimed_string_or_array)) { echo 'the variab

Is there any way to create skew animation for a View with ObjectAnimator in android -

Image
i want create skew animation view in android. so, have rectangular view (this normal/start state), @ end should looks this: i can such thing android.view.animation package using transformation of type_matrix . can create matrix , use preskew method, apply matrix custom animation , start animation on view. ok. but the problem want objectanimator . because using android.view.animation package not recommended use. can't solution problem objectanimator class. if have imageview , can use method setimagematrix objectanimator (and create custom matrixevaluator evaluate corresponding matrices each factor), want solution problem view class, not subclass of it. , main reason is, textview , example, doesn't have public method setmatrix , , want solution textview too. solution base view class main desire. there solution: create custom, example, skewtextview , in ondraw method use canvas.skew method. but worse solution using android.view.animation package, b

lua - Conditional operator does not work -

i use "storyboard", , conditional operator not work on create scene. file result.lua have statement, must rely age depending on variable mydata.year. operator "if" not work. my code on zip file "test.zip". please, me, doing wrong? its code: https://www.dropbox.com/s/40qxy6ljz725uol/test.zip

c# - Razor checkbox not binding to Model -

i'm asp.net mvc newbie. have checkbox in form @html.checkbox("don't show number", model.isphonepublic) but whether check box or not model.isphonepublic false while submitting form. pointers you using helper wrong , see definition here : so this: @html.label("don't show number") @html.checkbox("isphonepublic", model.isphonepublic) or @html.label("don't show number") @html.checkboxfor(m => m.isphonepublic) or third , clean solution: @html.labelfor(m => m.isphonepublic) @html.checkboxfor(m => m.isphonepublic) and in model definition: [displayname("don't show number")] public bool isphonepublic { get; set; }

c# - Wrap XML root node with parent node -

i have .net web api 2 application delivers data in xml. my problem: one of classes looks this: public class horse { public string name { get;set; } public string category { get;set; } } when serialize this, result is: <horse> <name>bobo</name> <category>largeanimal</category> </horse> what want wrap outgoing xml content root element this: <animal> <horse> ..... </horse> </animal> i hoping in custom xmlformatter. can't seem figure out how append root element on writestream. what best way resolve issue? i have tried tweaking answer work in custom xmlserializer, doesn't seem work. how add root node xml? ( had short amount of time write question, if missing, please leave comment.) so.. tweaked answer question: how add root node xml? work xmlformatter. the following code works, although feel hackish approach. public override task writetostreamasync(type type,

c# - Datasource Configuration Wizard do not show colum from stored procedure source -

is bugs or need done first, have tried both vs 2010 , vs 2013 update 2 i want create report (microsoft reporting view-local) source data stored procedure, : create procedure one_ok select * mytable this 1 ok datasource configuration wizard return column stored procedure. create procedure one_not_ok select * #result mytable select * #result this 1 datasource configuration wizard can not return column stored procedure, when click tree expand simple blank any please ? it's bad news if must declare dataset manually thx sen ok have found alternative quite way, create report-bi project file ext rdl after done things copy new file rdlc. why microsoft not improve configuration wiz query designer ones in report-bi any other easy ways best practice without manually copy rdl rdlc ?

python - Why is list+set method of making a list unique faster than dictionary keys method? -

here sample of timeit trial same: >>> import timeit >>> setup = """ ... random import randint ... rand_list = [randint(0,10) in range(0,10000)] ... """ >>> timeit.timer('list(set(rand_list))', setup=setup).repeat(5, 1000) [0.17256593704223633, 0.17117094993591309, 0.17115998268127441, 0.17191100120544434, 0.17226791381835938] >>> timeit.timer('{ x:true x in rand_list}.keys()', setup=setup).repeat(5, 1000) [0.4490840435028076, 0.44455599784851074, 0.442918062210083, 0.4430229663848877, 0.44559407234191895] as can see, list(set(my_list)) method approximately 2.5 times faster dictionary method, result similar smaller lists or bigger lists. can please explain why i.e. difference in functionality of execution of both these steps in terms of time complexity ? you running python loop on 10000 items in second test, in dictionary comprehension; loop slows down. you try dict.fromkeys() instea

php - Laravel 4: Updating table Joins with form model binding -

i once did eager loading query , worked. using model binding i'm trying update 2 tables @ once no lucky. no error thrown, validations fine , when tried var_dump see values after validation , there. can't way update 2 tables in database using eloquent @ time. please help. here did far: profilescontroller.php public function update($username) { $user = $this->getuserbyusername($username); $input = input::all(); try { $this->profileform->validate($input); // dd($input); $user->profile->update($input); } catch (formvalidationexception $e) { return redirect::back()->withinput()->witherrors($e->geterrors())->with('form_error', 'sorry, can not update profile. try again!'); } return redirect::route('profile.edit', $user->username)->with('form-success', 'profile has been updated!'); } public function getuserbyusername($username) { return user::with(

osx - cmake failed building project on mac -

i'm trying build project on new macbook built on linux computers. at first when run cmake , following: -- c compiler identification clang 5.1.0 -- cxx compiler identification clang 5.1.0 -- check working c compiler: /usr/bin/cc -- check working c compiler: /usr/bin/cc -- works -- detecting c compiler abi info -- detecting c compiler abi info - done -- check working cxx compiler: /usr/bin/c++ -- check working cxx compiler: /usr/bin/c++ -- works -- detecting cxx compiler abi info -- detecting cxx compiler abi info - done -- performing test have_clock_gettime -- performing test have_clock_gettime - failed -- boost version: 1.55.0 -- found following boost libraries: -- graph -- not find doxygen (missing: doxygen_executable) -- -> doxygen not found -> api-doc not created -- configuring done -- generating done -- build files have been written to: /path/to/folder and when run make , works till around 30% , stop error: /path/to/project/lib/helpers.cpp:555:2: error: us

css - How to use jQuery scrollTop and scroll down -

Image
how use scrolltop , scroll down in jquery? <div class="wrapper"> <div class="content"> <div class="items"> texttext </div> <div class="prev button">prev</div> <div class="next button">next</div> </div> </div> i've created: i want use scrolltop : i want scroll down: and more scroll: see jsfiddle: http://jsfiddle.net/kisspa/xembz/ <script> $(document).ready(function() { $(window).scroll(function() { if ($(this).scrolltop() > 200) { $('#scrolltotop').fadein(200); } else { $('#scrolltotop').fadeout(200); } }); // animate scroll top $('#scrolltotop').click(function(event) { event.preventdefault(); $('html, body').animate({scrolltop: 0}, 600); }) }); </script> <a href="javascript:void(0)" id="scrollto

android - Google play-service resources error -

i updated sdk yesterday , after restarting eclipse projects using google services broken. show me red "!". [2014-06-27 10:35:38 - basegameutils] c:\program files\android_adt\sdk\extras\android\support \v7\appcompat\res\values-v14\styles_base.xml:24: error: error retrieving parent item: no resource found matches given name 'android:widget.holo.actionbar'. [2014-06-27 10:35:38 - basegameutils] c:\program files\android_adt\sdk\extras\android\support\v7\appcompat\res\values-v14\styles_base.xml:28: error: error retrieving parent item: no resource found matches given name 'android:widget.holo.light.actionbar'. [2014-06-27 10:35:38 - basegameutils] c:\program files\android_adt\sdk\extras\android\support\v7\appcompat\res\values-v14\styles_base.xml:32: error: error retrieving parent item: no resource found matches given name 'android:widget.holo.actionbar.solid'. [2014-06-27 10:35:38 - basegameutils] c:\program files\android_adt\sdk\extras\android\suppor

How to create a line space in a Rails partial view? -

in index.html.erb view, have following render display each , every flight (without doing .each : <%= render @flights %> however, have flights partial written, flights listed side-by-side. want 1 flight listed per line. how create line space after each flight? <%= radio_button_tag :flight_id, flight.id %> <%= flight.id %> <%= flight.date.strftime("%b %d, %y") %> <%= flight.date.strftime('%i:%m:%s %p') %> <%= flight.from_airport.code %> <%= flight.to_airport.code %> <%= distance_of_time_in_words(flight.duration) %> why not use tables? <table> <%= render @flights %> </table> and in partial write <tr> <td><%= radio_button_tag :flight_id, flight.id %></td> <td><%= flight.id %></td> <td><%= flight.date.strftime("%b %d, %y") %></td> <td><%= flight.date.strftime('%i:%m:%s %p') %></

Anonymous inner classes in Java (from Thinking in Java 4th edition) -

i started learning java , there error in line 2: "small cannot resolved type". why? public class big { public small getsmall() { return new small() { void out() { system.out.println("big small out()"); } }; } public static void main(string[] args) { big b = new big(); small s = b.getsmall(); s.out(); system.exit(0); } } public small getsmall() { return new small() { void out() { system.out.println("big small out()"); } }; } there seems little misunderstanding. when declare anonymous inner class assumed small either interface implementing or class extending . if have small class or interface need import it. if not create one.

loops - Symfony2 Looping Same field in form -

i have problem in symfony2 form. have same field in form. create 1 one changing name. $formbuilderupload = $this->createformbuilder()->setaction($this->generateurl('bsi_bkpm_backend_uploadfile_create')); $formbuilder = $formbuilderupload; $formbuilder->add('file_1','file', array('required'=> false, 'label'=> 'file 1')) ->add('filename_1' , 'text', array( 'required' => false, 'label' => 'subject 1' )) ->add('description_1','text',array('required'=> false, 'label'=>' description 1')) ->add('file_2','file', array('required'=> false, 'label'=> 'file 2')) ->add('filename_2' , 'text', array(

Want to Print Partial string in GDB -

i writing gdb macro analyze core , print string. output of string core "sp-4/0/2". need print "sp", excluding others. not sure how achieve in gdb. pointers of great help. thanks in advance. see, argv[1] "sp-4/0/2" (gdb) p argv[1] $4 = 0x7fffffffe3fa "sp-4/0/2" and 2 first chars: (gdb) printf "%.2s\n", argv[1] sp or (gdb) printf "%c%c\n", argv[1][0],argv[1][1] sp

c++ - clock_gettime() returns about 1-2ms inaccuracy every 50-100ms (Debian wheezy on Virtualbox) -

i had closely related thread while ago here . however, replacing cin.ignore() usleep(50e3) . not report every 50ms. clock reports time passed: s: 0 ms: 50 time passed: s: 0 ms: 101 time passed: s: 0 ms: 152 time passed: s: 0 ms: 202 time passed: s: 0 ms: 252 time passed: s: 0 ms: 303 time passed: s: 0 ms: 353 time passed: s: 0 ms: 403 time passed: s: 0 ms: 454 time passed: s: 0 ms: 504 time passed: s: 0 ms: 554 time passed: s: 0 ms: 605 time passed: s: 0 ms: 657 time passed: s: 0 ms: 708 time passed: s: 0 ms: 758 time passed: s: 0 ms: 808 time passed: s: 0 ms: 862 time passed: s: 0 ms: 915 time passed: s: 0 ms: 965 time passed: s: 1 ms: 15 time passed: s: 1 ms: 66 time passed: s: 1 ms: 116 time passed: s: 1 ms: 169 time passed: s: 1 ms: 221 time passed: s: 1 ms: 271 time passed: s: 1 ms: 322 time passed: s: 1 ms: 372 time passed: s: 1 ms: 423 time passed: s: 1 ms: 473 time passed: s: 1 ms

cordova - Is there some way to develop Phonegap App in general WWW folder if Android specific XML config files are required? -

i developing cordova/phonegap project in general www folder (not in subfolders available under platform folders) in application checking connection status (if device online/offline), there configuration changes required in (app/androidmanifest.xml) , (app/res/xml/config.xml) file. files available under platform folders. is there workaround this? (so can continue develop app in general www folder)? , if there is, should copy /store these files? if using command line interface cli / command prompt install plugin, don't need worry configuration, install connection plugin , put code in general www. if manually installing plugins, make changes in app/androidmanifest.xml , app/res/xml/config.xml subfolders required, , put html,js,css files in general www folder. when build platform or run it, files general www put subfolders' www automatically.

javascript - Gulp throwing "pre-build test failed" errors at end of tasks execution -

i'm facing issue gulp. @ end of every gulp task i'm having error : c:\dev\yo\backbone>gulp jshint [12:03:09] using gulpfile c:\dev\yo\backbone\gulpfile.js [12:03:09] starting 'jshint'... c:\dev\yo\backbone\src\scripts\utils.js: line 3, col 30, missing semicolon. 1 error [12:03:11] finished 'jshint' after 2.33 s ? pre-build test failed, compiling source... ? pre-build test failed, compiling source... ? pre-build test failed, compiling source... ? pre-build test failed, compiling source... ? error: getaddrinfo enotfound ? error: getaddrinfo enotfound ? pre-build test failed, compiling source... ? error: getaddrinfo enotfound ? error: getaddrinfo enotfound libpng-dev installed it seems network operations launched don't understand why since task has finished. i'm working corporate proxy server must block these network operations. has met same problem ? there configuration set ? thanks in advance. the error message saids "missin

android - difference between window.openDatabase() and window.sqlitePlugin.openDatabase() functions? -

using cordova version 3.x , android version 2.x 4.x. i wondering: is understanding correct android devices default have sqlite program/interface creating sqlite database? do both above database function calls create sqlite database in device? if above answer no , type of database both above function calls create? if answer yes , window.sqlite.opendatabase() function wrapper around window.opendatabase() ? are databases created call persistent? is, data available after closing , reopening cordova packaged apps? is there maximum database size can created above 2 methods? websql ( window.opendatabase ) deprecated web standard. available in desktop , mobile browsers. browsers implement specification using sqlite. in android, browsers , webviews support websql, along local storage , session storage first versions, , indexeddb since kitkat. then have android independently supports sqlite used java apis 1 of main persistence mechanisms. cordova special. app ru

c# - saving date time exception -

i have class callnote contain entity [datatype(datatype.date)] [displayformat(dataformatstring = "{0:yyyy-mm-dd}", applyformatineditmode = true)] public datetime callbackdate { get; set; } and controller like: [httppost] public actionresult createnote(callnote callnote) { yelloadmindbcontext db = new yelloadmindbcontext(); if (modelstate.isvalid) { db.note.add(callnote); //var temp = db.note.find(feedback); //db.savefeedback.add(new savefeedback { loginid = id, feedback = temp }); db.savechanges(); return redirecttoaction("callhistory"); //return javascript("alert('success');"); } return view("callhistory", callnote); } and in view: <div class ="editor-label"> @html.editorfor(item => item.callbackdate) @*@html.validationmessagefor(item => item.callbackdate)*@ </div> i

memory management - Why Windows Server 2008 R2 x64 can't allocate more than 1.2GB for 32bit process -

i have strange behavior of windows os regarding 32-bit processes regarding memory allocation. problem - seems 32-bit process can't allocate more around 1.2gb, limit floats between 1.1gb , 1.3gb depending on conditions have no idea about. my environment is: windows server 2008 r2 total physical ram - 16gb ram in use @ moment of experiment - 6gb (i.e. around 9+gb free) i have self-written c++ tool, bounces memory allocation via malloc() in blocks of 32mb until gets denial os (the upper limit right 1070mb, mentioned - limit floats, max number remember around 1.3gb) , releases these blocks in reverse order. done in cycle. so the questions have are: why can't close real limit of 2gb 32bit process? 1.3gb 60% of theoretical limit. inability @ least 0.5 gb more seems strange me. have 9gb of unused ram. what (at runtime) can influence on top limit? change on time - have no idea why. i'd control somehow - there magic command optimize os address space :) in rep

gremlin - Why RexsterGraph is not meant for high-performing graph traversals? -

why rexstergraph in blueprint stack not meant high-performing graph traversals: https://github.com/tinkerpop/blueprints/wiki/rexster-implementation what limitations? , should fallback on executing gremlin throw simple string evaluated? rexstergraph uses rexster rest api restful representation of blueprints api. such, each blueprints method called in rexstergraph translates http call. here's example of why that's bad "high performance traversals". using toy graph , example. let's want simple rexstergraph like: g.v(1).out.filter{it.name=='josh'}.name . translate following http calls: vertices/1 - gets data v(1) vertices/1/oute - gets out edges v(1) vertices/2 - knowing out edges tells other vertex retrieve vertices/3 - knowing out edges tells other vertex retrieve vertices/4 - knowing out edges tells other vertex retrieve vertices/2 - filtering need name property vertices/3 - filtering need name property vertices/4 - filte