Posts

Showing posts from January, 2012

jquery orgChart with multiple roots -

i using plugin https://github.com/caprica/jquery-orgchart display users activedidrectory. problem structure not correct. need display tree(s) able fix later. need display multiple trees on page. $("#chart").orgchart({ data: $.post(json server) }); this gives me following error typeerror: rootnodes[0] undefined $container.empty().append(rootnodes[0].render(opts)); any ideas useful , appreciated. thanks p.s. data retrieve comes in proper format, tested minified version of it. problem comes when there r multiple root="0" see jquery.post() async request not wait results, why seems create issue. i guess need way: $.post("your/url/here", {data:"to send here"}, function(data){ $("#chart").orgchart({ data:data }); }); initialize chart when have data create chart.

node.js - What exactly does the task Mocha Test Parser -

can show me how output atlassian bamboo "mocha test parser" looks like? run task "mocha test runer" , mocha.json result. don't see diagrams or else. "mocha test parser" task read test results mocha.json file, has generated "mocha test runer" task , display them in tests tab in bamboo, , next each build.

qt creator - CMake Warning: You have called ADD_LIBRARY for library my_src without any source files -

i'm trying call add_library files endings. the dir structure is: src | - cmakelists.txt (1) | - main.cpp | - gui | - cmakelists.txt (2) | - source , header files so cc files in gui directory. (1) cmakelists.txt: file( glob_recurse my_sources *.cc ) message(status "my_sources = ${my_sources}") add_subdirectory( gui ) add_library( my_src ${my_sources} ) target_link_libraries( my_src my_gui ) qt5_use_modules( my_src core gui widgets) (2) cmakelists.txt: file( glob my_gui_sources *.cc) add_library( my_gui ${my_gui_sources} ) qt5_use_modules( my_gui core gui widgets) but keep getting output: you have called add_library library my_src without source files. typically indicates problem cmakelists.txt file -- my_sources = /home/bla/bla/src/gui/borderlayout.cc;...;/home/bla/bla/my/src/gui/mainwindow.cc -- my_gui_sources = /home/bla/bla/my/src/gui/borderlayout.cc;...;/home/bla/bla/my/src/gui/mainwindow.cc -- configuring done -- generating d

Rails how to make tags in Product model by categories -

i have models product(title, description, category_id) , category(title, description). class product < activerecord::base belongs_to :category class category < activerecord::base has_many :products now product can have 1 category , it's working perfectly, want make, product can have 1 more categories tags, can't understand how.. you need has_and_belongs_to_many association documented here edit: ok asked quick example class product < activerecord::base has_and_belongs_to_many :categories class category < activerecord::base has_and_belongs_to_many :categories migrations create_table :categories |t| t.string :title ... create_table :products |t| t.string :title ... create_table :categories_products, id: false |t| t.belongs_to :category, index: true t.belongs_to :product, index: true end you can access products categories product.find(1).categories

html - css "display:table !important" And IE11 not working -

"display: table !important" working fine in chrome not working in ie 11 asking solution or other feature similar substite this part of css , html code , not of it: <ul id="jmenu"> <li><a href="#" >educational services >> </a> <!--------------------------------------------> <ul style="list-style: none; display:table; "> <li ><a href="#" >for institutions >></a> <ul style="list-style: none; "> <li ><a href="#">application form</a> </li> <li ><a href="#" >photo gallery</a> </li> <li ><a href="#" >policy</a> </li> &l

ios - xcode parse! uitableview cell in order! in last created "DATE" -

i have parse uitableview. cells inserted randomly table view. wanted them come in latest created there @ top. every time make new cell in  parse should come top. are using parse sdk? if yes, can use [query orderbydescending:@"createdat"];

ember cli - Bower install downgrades my package -

every time install new bower package on ember cli pack, got missing bower packages: package: ember * specified: 1.11.0 * installed: 1.10.0 then run bower install ember#1.11.0 . unable find suitable version ember, please choose one: 1) ember#1.10.0 resolved 1.10.0 , required test-addon 2) ember#>= 1.8.1 < 2.0.0 resolved 1.11.0 , required ember-data#1.0.0-beta.16 3) ember#> 1.5.0-beta.3 resolved 1.11.0 , required ember-resolver#0.1.15 4) ember#>=1.4 <2 resolved 1.11.0 , required ember-cli-shims#0.0.3 5) ember#1.11.0 resolved 1.11.0prefix choice ! persist bower.json i choose 5 (why hassle if explicit added desired version), works again. but next time if install new bower package, have again. node 0.12.1 bower 1.3.12 emvber cli 0.2.2 you may use -f flag force use latest version: bower install -f (see docs ) in case bower didn't asking versions.

visual studio - VisualSVN asking for TortoiseSVN -

i have team of 4 peoples, including me, going work on project. have installed visualsvn server on machine set svn server. have installed visualsvn client on machine , been integrated machine. here machine client , server. server other users , client me. earlier, had tortoise , visualsvn client. time working fine. have removed tortoisesvn, have installed visualsvn server. when "commit" changes, visualsvn says "tortisesvn not installed. ....." now using both visualsvn server , client, why should need tortoisesvn more? or wrong ..? i guess reason problem explained on https://www.visualsvn.com/visualsvn/download/tortoisesvn/ visualsvn uses tortoisesvn of dialogs. "add solution" wizard, "get solution" command , visual studio integration (status icons, transparent file operations etc.) not depend on tortoisesvn.

callback - Notify webapp that the image has been successfully captured from android hybrid app -

i have below query: scenario have developed android hybrid application, our web application hosted on remote server opened inside webview container of android. requirement capture image camera , attach form. limitations android cannot call methods (callback) on remote javascript. web application, being single page html5 , jquery application, cannot reloaded/navigated. present implementation able open camera capturing url navigation event of android webview (navigation triggered on ‘attach’ button click dummy url website). still no way notify webapp image has been captured/uploaded on server. appreciated. one way poll server @ regular intervals , check. since u cannot call remote js. other option not preferred, reload webview(refresh current page in browser history) once u done image uploading in background native.

haskell - How to do automatic differentiation on complex datatypes? -

given simple matrix definition based on vector: import numeric.ad import qualified data.vector v newtype mat = mat { unmat :: v.vector } scale' f = mat . v.map (*f) . unmat add' b = mat $ v.zipwith (+) (unmat a) (unmat b) sub' b = mat $ v.zipwith (-) (unmat a) (unmat b) mul' b = mat $ v.zipwith (*) (unmat a) (unmat b) pow' e = mat $ v.map (^e) (unmat a) sumelems' :: num => mat -> sumelems' = v.sum . unmat (for demonstration purposes ... using hmatrix thought problem there somehow) and error function ( eq3 ): eq1' :: num => [a] -> [mat a] -> mat eq1' φs = foldl1 add' $ zipwith scale' φs eq3' :: num => mat -> [a] -> [mat a] -> eq3' img φs = negate $ sumelems' (errimg `pow'` (2::int)) errimg = img `sub'` (eq1' φs) why compiler not able deduce right types in this? difftest :: forall . (fractional a, ord a) => mat -> [mat a] -> [a] -> [[a]] difftest m φs as0 = gra

python - Django messages not working -

i trying use django's messages framework. i've done told in https://docs.djangoproject.com/en/dev/ref/contrib/messages/#enabling-messages i add messages messages.success(self.request, 'updated.') no messages shown. {% if messages %} evaluates false. if print {{ messages }} <django.contrib.messages.storage.fallback.fallbackstorage object @ 0x7fb701c47b70> . what can wrong? my middlewares middleware_classes = ( 'django.contrib.sessions.middleware.sessionmiddleware', 'django.middleware.common.commonmiddleware', 'django.middleware.csrf.csrfviewmiddleware', 'django.contrib.auth.middleware.authenticationmiddleware', 'django.contrib.auth.middleware.sessionauthenticationmiddleware', 'django.contrib.messages.middleware.messagemiddleware', 'django.middleware.clickjacking.xframeoptionsmiddleware', ) my template context processors template_context_processors = [ &quo

validation - jQuery Validate - display one warning for the same types of errors -

i have simple form has several input elements required: $("input").each(function(index, elem) { var rules = { required:true } $(elem).rules("add", rules); }); and want place error messages in div, this: <div id="errorcontainer" class="inputgreska"> there errors. please correct following: <ul id="errorlabelcontainer"></ul> </div> so, did following: $("#forma").validate({ errorclass: "red", errorcontainer: "#errorcontainer", errorlabelcontainer: "#errorlabelcontainer", wrapper: "li", errorelement: "div" }); the problem following: if user forgets fill more 1 input - within error container there same warnings repeated. so, if user forgets fill 3 fields, there be: this field required. this field required. this field required. is possible show

How to rebuild solr index using core reload -

i need update solr schema testing search relevancy in application. this article says: one can delete documents, change schema.xml file, , reload core w/o shutting down solr. when added copyfield , followed same approach, changes not reflect. missing anything? you missing important step document. re-index data. not changes schema files reloadable dynamically. for ex. adding copyfield requires reindexing of data. those changes considered backward compatible indexed data reloadable without need re-indexing.

c - Linux: My char driver creates a node in sysfs but can not clean it after reloading -

i writting simple char driver. create node in sysfs device_create() , created properly. node in /dev automatically well. problem class_distroy() , device_destroy() don't clean /sys/devices/virtual/tdmcdev/tdm/ directory crated on init. init , close code below ... /* node in /dev/ */ tdm->dev_major = 0; //for dynamic major tdm_dev = mkdev(tdm->dev_major, 0); tdm->dev_major = major(tdm_dev); err = alloc_chrdev_region(&tdm_dev, 0, 1, "tdm"); //one node read/write data frame if (err) { printk("can't alloc minor /dev/tdm\n"); return -enodev; } cdev_init(&(tdm->cdev), &tdm_dev_fops); tdm->cdev.owner = this_module; err = cdev_add(&(tdm->cdev), tdm_dev, 1); if (err) { printk("cdev_add() failed /dev/tdm\n"); unregister_chrdev_region(tdm_dev, 1); return -enodev; } /* node /sys/devices/virtua

html5 - window.location.assign() is not catched by Router in dart -

i try use router route_hierarchical/client.dart listen onpopstate event , enable/disable <div> in index.html. (example in stagehand.pub dart plugin) if done via normal <a href="/relativepath"> in index.html, works. if try change path via button.onclick.listen() handler in call: window.location.assign('/relativepath'); i 404 , router not handling event properly. should that action not invoke popstate event caught router described here ? handlers.dart ... button.onclick.listen((_){ window.location.assign('/about'); }); ... router.dart var router = new router(); router.root ..addroute(name: 'about', path: '/about', enter: showabout) ..addroute(name: 'login', defaultroute: true, path: '/', enter: showlogin) ..addroute(name: 'context', path: '/context', enter: showcontext); router.listen(); } void showabout(routeevent e) { // extremely simple , non-scala

android - No files detected on FTP server -

i'm running ftp server, contains file in root directory: "/". program able connect , login server , able change root directory. when try list name of files , print out single file located, gives me error saying: "attempt read null array". here code: ftpclient = new ftpclient(); log.d("loginactivity", "ftp"); ftpclient.connect("xxx.xxx.x.xx", xx); boolean connected = ftpclient.isconnected(); if(connected){ log.d("loginactivity", "connected: true"); } boolean loggedin = ftpclient.login("name", "password"); if(loggedin){ log.d("loginactivity", "loggedin: true"); } boolean founddirectory = ftpclient.changeworkingdirectory("/"); if(founddirectory){ log.d("loginactivity", "directory found: true"); } string[] files = ftpclient.listnames("/"); log.d("logina

java - Spring boot Autowired Mongo Repository not working -

i trying connect spring boot application mongo db follwoing this tutorial. pretty simple, have class scanresults objects trying save in db when receive post request. following error on autowired. exception in thread "main" org.springframework.beans.factory.beancreationexception: error creating bean name 'application': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: public com.gandharv.iiitd.scanresultsrepository com.gandharv.iiitd.application.repository; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'scanresultsrepository': invocation of init method failed; nested exception org.springframework.data.mapping.model.mappingexception: not lookup mapping metadata domain class java.lang.object! @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor.postprocesspropertyvalues(autowiredannotat

java - how to know the data size returned from mysql server with connector-j -

i using mysql connector-j java perform query. know size of data returned when use with/without compression. best way obtain total amount of data passed server client? the code using works preparedstatement , resultset : preparedstatement preparedstatement = connection.preparestatement(sql); rs = preparedstatement.executequery(); while (rs.next()) { function.apply(rs); } can obtain amount of data in java? there external way it? you can make that: stringbuffer sb = new stringbuffer(); while (rs.next()) { function.apply(rs); sb.append(<your_data>); } double len = sb.tostring().length() / 1024;

python - SpooledTemporaryFile: units of maximum (in-memory) size? -

the parameter max_size of tempfile.spooledtemporaryfile() maximum size of temporary file can fit in memory (before spilled disk). units of parameter (bytes? kilobytes?)? documentation (both python 2.7 , python 3.4 ) not indicate this. the size in bytes. spooledtemporaryfile() source code : def _check(self, file): if self._rolled: return max_size = self._max_size if max_size , file.tell() > max_size: self.rollover() and file.tell() gives position in bytes. i'd use of term size in connection python file objects not expressed in bytes warrants explicit mention. other file methods deal in terms of size work in bytes well.

Adding Library to project in Android Studio -

i working mupdf library rendering pdf files in android application. for built mupdf library using ndk , different tools. now want add compiled code project in android studio. i quite new android studio not able it. so can 1 me with. i trying follow this link. you add library in libs directory here: c:\users\blabala\desktop\project\app\libs and write in gradle this: dependencies { compile filetree(include: ['*.jar'], dir: 'libs') } also can watch this tutorial. more information here update: c:\users\balbala\desktop\appname\library just add library in project rebuild project , go but have change manifest of library this: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.blabala"> <uses-sdk android:minsdkversion="4" android:targetsdkversion="

oracle - Invalid number error - [Error Code: 1722, SQL State: 42000] ORA-01722: invalid number -

the 1st query below 2 queries giving me [error code: 1722, sql state: 42000] ora-01722: invalid number error. when limit no of records in 2nd query running fine. other limiting rows in 2nd query, both queries identical. select b.first_name, b.last_name, b.device_derived, b.ios_version_group, b.add_date, first_value (b.add_date) on (partition b.first_name, b.last_name, b.ios_version_group) first_date, last_value (b.add_date) on (partition b.first_name, b.last_name, b.ios_version_group) last_date (select a.first_name, a.last_name, a.os_version, a.device_type, a.device, a.add_date, a.device_derived, case when ( ( upper (a.device_derived) = 'iphone' or upper (a.device_derived) = 'ipad') , to_number (substr (a.os_ve

sql - Aggregate function not giving sum -

Image
i have query: select o.idorder, sum(case when cast(isnull(ama.freeshiping, 0) int) = 0 - 1000 else cast(isnull(ama.freeshiping, 0) int) end) freeshiping orderdetail od, amazonsku ama, orders o, tempprintrecords tmp o.idorder = od.idorder , o.idcustomer = ama.idcustomer , od.sku = ama.sku --and od.idorder=350184 , od.idorder = tmp.idorder , ama.freeshiping != 0 group o.idorder result: here have 0 , null in ama.freeshiping basically column bit , contains 0 , 1. if 0 found make -1000 identify idorder having 0 or null freeshipping but it's not giving proper sum, should give result in -ve each column. this expression in where clause: and ama.freeshiping != 0 only chooses values "1". remove if want see other values. you should learn use proper join syntax. if used join keyword, of conditions in on clauses, , where condition might have been easier spot

android - How do I get the ID of the item of row (each row has 3 items) from a ListView, which contains a clickable items (imagebuttons)? -

i read many articles problem in stackoverflow didn't solve problem. have listview have rows, each row has 3 imagebuttons, when click @ imagebutton code in "setonitemclicklistener" doesn't work. i need item(imagebutton) in rows clicked. in listview many rows. i hear simplecursoradapter, fragmentlist, cursorloader, my min required sdk 10 . in code used 6 images going use more images(100). my java code : package foxstrot.ghp; import android.app.activity; import android.content.intent; import android.os.bundle; import android.util.log; import android.view.view; import android.widget.adapterview; import android.widget.listview; import android.widget.simpleadapter; import java.util.arraylist; import java.util.hashmap; import java.util.map; public class images extends activity { int[] images = {r.raw.a2, r.raw.a3, r.raw.im2, r.raw.a4, r.raw.a5, r.raw.im6,}; listview lv; intent = new intent(this, king.class); final string log_tag = "l

Perl script logic converted to C# -

i have perl script need convert c#. but have hit speedbump. the perl script: use math::basecnv; use math::basecnv dig; use xml::simple; use lwp::simple; dig('url'); # select right alphabet base64 $parser = new xml::simple; $url = 'http://10.0.2.128/api.xml'; $content = $url or die "unable $url\n"; $data = $parser->xmlin($content); $stringdata=$data->{datafield}; $decvalue = cnv('a'.substr($stringdata,3,54),64,10); dig('hex'); $hexvalue = cnv($decvalue,10,16); the value of $stringdata is ws=3lcobgcaxjqaadljiqeaaag2fdadiaab7qhka6eyapqga1cc8gaa4e length: 57 the value of $decvalue is 29461891743732702623135632717213292230507524331718660652410396996938709350973448271678550990392836 length: 98 and value of $hexvalue is dcb08e06009ac634000039632101000001b6143003880001ed01ca03a13200f420035702f20000e04 length: 81 my issue cant same $decvalue , $hexvalue when using c#. have searched google dry , not close getting th

mysql - How to add more than one value to a database table row? -

i have 2 tables named event , activity . have eventid foreign key of activity table , activityid fk of event table. problem is, activity can have 1 event, event can have many activities. can add 1 value activityid column in event table. can please suggest me solution it? you need junction table . . . eventactivities , this: create table eventactivities ( eventactivitiesid int not null primary key auto_increment, eventid int not null references events(eventid), activityid int not null references activities(activityid) ); then database have 3 tables, , don't need column directly connecting activities , events .

c - Flex, how to process HTML file -

i using libcurl , flex download images webpage. i have libcurl easy functions set download html file given url , have regular expression don't know how process downloaded html file. example: have file "fp" downloaded , saved in specific location , need pass fp regular expressions process structure of file is: %{ #include <...> ... %} %% /* regular expressions */ %% int main () { ... //c code file fp downloaded , saved } so, how "send" fp file regular expression process ? any suggestions ? thanks. after reading comment user58697 start reading yyin , discovered after having file opened in c can delegate yyin doing: fp = yyin assuming file called fp. once that, file processed in regular expressions. i found solution in 2nd example of this page .

javascript - multiple select get recently selected option value -

i want know last or selected option value dropdown i have tried following code in django : <script type="text/javascript"> django.jquery(document).ready(function(){ django.jquery("#id_emuhibah_issue").on("click", function(e){ console.log(" click -------"); console.log(django.jquery(this).val()); console.log(this.value); }); }); django.jquery(document).ready(function(){ django.jquery("#id_emuhibah_issue").on("change", function(e){ console.log(" chage -------"); console.log(django.jquery(this).val()); console.log(this.value); }); }); </script> seems there no luck find out last selected value can suggest solution above case? just remove click function , use on.("change" function..) 1 function 1

inheritance - Hibernate does not use discriminator in query with InheritanceType.JOINED -

i have following entities: @entity @table(name = "employee") @inheritance(strategy = inheritancetype.joined) @discriminatorcolumn(name="type") public class employee {} @entity @table(name = "regular_employee") @primarykeyjoincolumn(name = "id") @discriminatorvalue("r") public class regularemployee extends employee{} the problem hibernate not use discriminator value in queries. select employee0_.id id1_1_, employee0_.name name2_1_, employee0_.type type3_1_, employee0_1_.pay_per_hour pay_per_1_0_, case when employee0_1_.id not null 1 when employee0_.id not null 0 end clazz_ employee employee0_ left outer join regular_employee employee0_1_ on employee0_.id=employee0_1_.id shouldn't hibernate use discriminator value in "left jouter join" section? like: left outer join regular_employee employee0_1_ on employee0_.type='r' , employ

javascript - Firefox screen flickers when resizing -

i facing flickering issue, on re-sizing, firefox web browser. think because of use of svgs on page. tried adding transition css property referring following links, didn't help. 1. https://css-tricks.com/forums/topic/can-i-stop-flickering-on-hover/ . 2. https://developer.mozilla.org/en-us/docs/web/guide/css/using_css_transitions any or starting reference appreciated. thank you. new css. 1 more thing, screen not flicker in chrome or ie. hope information helps , not stupid question.

Breeze issue with complexType change tracking -

i use angular , breeze in app , use "haschangeschanged" event handling state of entities stored in entitymanager. have problem when have entity property complextype , isscalar=false. problem occurs when make request twice (without changing entity) , same entity. on second request "haschangeschanged" event fired haschanges=true. in moment when event fired entity has state "modified", after data loaded state changed "unchanged". i've wrote (jasmine) unit test. in comments information assertion throws error. var entity, haschanges = false, listeners = { onchange: function (event) { console.log('change', event.haschanges); } }; spyon(listeners, 'onchange'); $httpbackend.expectget('json/sampleentity?').respond(200, [ { id: 1, name: 'some name', data: {}, $type: 'sampleentit

javascript - jQuery Spinner does not show up before the upcoming function finished loading -

i created 2 functions should show , hide spinner ( ios spinner ): var overlay; function startspin() { var opts = { lines: 13, // number of lines draw length: 11, // length of each line width: 5, // line thickness radius: 17, // radius of inner circle corners: 1, // corner roundness (0..1) rotate: 0, // rotation offset color: '#fff', // #rgb or #rrggbb speed: 1, // rounds per second trail: 60, // afterglow percentage shadow: false, // whether render shadow hwaccel: false, // whether use hardware acceleration classname: 'spinner', // css class assign spinner zindex: 2e9, // z-index (defaults 2000000000) top: 'auto', // top position relative parent in px left: 'auto' // left position relative parent

java - Requiring user to enter only 1 char for a letter grade for a gpa program -

i trying finish java assignment , stuck on last bit. need make when user enters letter grade in order calculate g.p.a. can enter 1 letter. for example, need receive error if enter aaa instead of a . i stuck on how go doing this. works except 1 thing. new java great. here class: public class gpa { private int sumcredits; private int sumpoints; public int getpointsforgrade(char letter) { int gradepoints; switch (letter) { case 'a': case 'a': gradepoints = 4; break; case 'b': case 'b': gradepoints = 3; break; case 'c': case 'c': gradepoints = 2; break; case 'd': case 'd': gradepoints = 1; break; case 'f': case 'f': gradepoints = 0; break; default: gradepoints = -1; break; } return gradepoints; } public void constructor(){ sumcredits = 0; sumpoints

security - YouTube API v3 - Do I really need to use OAuth for basic read operations? -

i have system user can add content profile, such youtube videos, validate video url , call api video details such title, description , details. nothing else, no update\edit operations. for i'm using public api key authorize requests, put system domain whitelist $http.get(' https://www.googleapis.com/youtube/v3/videos?id= ' + videoid + '&key={{my_key}}' + '&part=snippet') regarding security issues, need use oauth 2.0 issue token used authenticate requests? if tracked request , capture key, need prevent via oauth, or there's way google developer console make read operations only. thanks. you don't need oauth2 read public information. as can see videos.list , there no authorization scope listed it.

javascript - Using D3 in Rails ActiveAdmin -

i building application in ruby-on-rails 4. have designed administration site using activeadmin. works great add chart index pages using d3.js through rendering of partial. have been impressed d3.js library, realy new @ have been trying developments training. i have not found thsi specific case on internet try nice tutorial : using d3 in rails . have included d3.js library followinh tutorial. partial looks this: #app/views/admin/_chart.html.erb <h3>hello world!</h3> <svg id="graph"></svg> and admin user.file looks : #app/admin/user.rb collection_action :data, method: :post respond_to |format| format.json { render :json => [1,2,3,4,5] } end end then have script below in assets/javascript/graph.js: $.ajax({ type: "get", contenttype: "application/json; charset=utf-8", url: 'data', datatype: 'json', success

c++ - How to change Firefox Homepage using GPO (Group policy) -

so far, have developed solution in c# doesn't use gpo. modifies prefs.js file. this have tried far using c#: using system; using system.collections.generic; using system.componentmodel; using system.data; using system.drawing; using system.io; using system.linq; using system.text; using system.threading.tasks; using system.windows.forms; namespace firefoxhomepagechanger { public partial class form1 : form { public form1() { initializecomponent(); } public static void setmozilla(string strurl) { try { string strsystemuname = environment.username.tostring().trim(); string systemdrive = environment.expandenvironmentvariables("%systemdrive%"); string strdirectory = ""; string strpreffolder = ""; if (directory.exists(systemdrive + "\\documents , settings\\" + strsystemuname +

html - Bullets not appearing in wordpress site -

when creating unordered lists bullet points not appear unless manually apply css html. style="padding-left: 30px; list-style: disc;" what can update no longer happens? example site @ following url. remove in style.css 1008 /*tabs*/ 1009 .tab-shortcode ul { /* list-style: none */}

java - Byte to "Bit"array -

a byte smallest numeric datatype java offers yesterday came in contact bytestreams first time , @ beginning of every package marker byte send gives further instructions on how handle package. every bit of byte has specific meaning in need entangle byte it's 8 bits. you convert byte boolean array or create switch every case can't best practice. how possible in java why there no bit datatypes in java? because there no bit data type exists on physical computer. smallest allotment can allocate on modern computers byte known octet or 8 bits. when display single bit pulling first bit out of byte arithmetic , adding new byte still using 8 byte space. if want put bit data inside of byte can stored @ least single byte no matter programming language use.

delphi - how to locate a hyperlink field -

i have access 2010 table hyperlink field store e-mail adress of clients. before add new e-mail want check if e-mail address there. try use locate statement (delphi 2009; adoconnection, tadodataset): if table.locate('ml_link',newadress,[locaseinsensitive]) then this statement gives error message sequence not allowed. how can search hyperlink fields? i suspect @ character considered special character. suggest try splitting address 2 parts, email , domain example, search both fields as if table.locate('email;domain', vararrayof([newemail, newdomain]), [locaseinsensitive]); you may need add variants uses clause, depending on delphi version..

networking - Routing table interpretation -

given following table, network using 8-bit host addresses, asked compute associated range of destination host addresses every interface. asked number of addresses in every range. table: prefix match interface 00 0 010 1 011 2 10 2 11 3 i determined given prefixes of 8-bit binary ip's , concluded that: 00000000 00111111 (0-63 in decimal) uses interface 0 addresses in range = 2 power of (8 - number of bits in prefix, 2) = 64 01000000 01011111 (64-95 in decimal) uses interface 1 addresses in range = 2^(8-3) = 32 01100000 10111111 (96-191 in decimal) uses interface 2 addresses in range = 2^5 = 32 11000000 , higer (192+ in decimal) uses interface 3 addresses in range = 2^5 = 32 is reasoning correct? the number of addresses in each range 2 (8 - prefixlen) . if prefix has 2 bits, number of addresses 2 6 = 64.

android - In the OpenRTB bid requests, is "bundle" unique to an app? -

i looking @ multple openrtb specs, example mopub. have bundle field in bid request. bundle number 123456 ios app, or package name android app package.bundle.apname. "bundle" unique app? can single app have multiple "bundle"? can single "bundle" might mean multiple apps? great questions! please see answers inline. is "bundle" unique app? --> yes, "bundle id" unique identifier single app within platform's "app store ecosystem" (ecosystem = android:google play store, ios:apple app store) for example, "bundle id" (aka 'android package name') android nytimes app on google play store 'com.nytimes.android' (listed in url). no other apps on google play store permitted use bundle id 'com.nytimes.android'. specific nytimes android app only. on ios side, "bundle id" ios nytimes app on apple app store 'id284862083' (listed in url). no other apps in app

c# - Linq Join: Join using a mapping table and associate objects -

i trying write linq query make basic join. have 2 arrays park[] parks = new park[]{ new park() {id = 1, name = "free park"}, new park() {id = 2, name = "cost park"}, new park() {id = 3, name="sneak in park"} }; and facility[] facilities = new facility[] { new facility() { id = 1, name = "swing", minimumage = 1, maximumage = 120}, new facility() { id = 2, name = "slide", minimumage = 1, maximumage = 200}, new facility() { id = 3, name = "see-saw", minimumage = 1, maximumage = 300} }; each park can have 0...n facilities, hence have set of mapping objects parkfacility[] associations = new parkfacility[] { new parkfacility() {parkid = 1, facilityid = 1}, new parkfacility() {parkid = 1, facilityid = 2}, new parkfacility() {parkid = 1, facilityid = 3}, new park

c# - Is it possible to hide SQL connections from 3rd party developers? -

we hired 3rd party finish c# web project , need access our sql database. how can hide our user name , password them still give them access? efforts far include: creating wcf realize not have control of servers hosting our web site. creating dll able find actual connection string digging through watch window @ break point while debugging. encrypting connection strings within web config. using watch window @ break point, can find decrypted connection string. create new database , change user name , password , let them access that.

javascript - Add text to textbox when check if radio box is selected -

i trying make little project myself in order better understand javascript. not looking expert have better understanding. i making dilution calculator , wondering best way insert units (either oz or ml) input boxes , output divs based on whether or not radio selected. automatically happen on page load on change of radio. <div class="input-group input-margin-top"> <input type="text" id="containersize" class="form-control" value="0" onclick="this.select();"> <span class="input-group-addon"> <input type="radio" name="inlineradiooptions" id="ounces" checked> oz </span> <span class="input-group-addon"> <input type="radio" name="inlineradiooptions" id="millilitres"> ml </span> </div> here how have html setup radio buttons i wondering best way not have nan show when se