Posts

Showing posts from January, 2013

Google Sheets QR code "tab" -

i working google sheets make qr codes. have scanner programmed 'tab' function after every scan , works well. make single qr code has 3 different pieces of information in tab between each , enter on end. have tried many ways , found of them work fine in notepad, nothing working in form there 3 fields. form has following fields: plant, department, part# have tried using: //cell e12 has 106+%09+w6311a+%09+12345678 or 106+char(9)+w6311a+char(9)+12345678 =if(isblank(e12),"",image("https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl="&e12)) //a14==106, b14==w06311a, c14==12345678 =concatenate(a14, char(9),b14,char(9),c14,char(10)) //a15==the above concatenate code =image("https://chart.googleapis.com/chart?chs=200x200&cht=qr&chl="& urlencode(join(char(10),arrayformula(a15)))) //this script called above code: /** * converts string encoded uri * * @param {string} component component want encode * @return {string}

mysql - create unique id with a length of 5 in php -

i know uniqid() method create lots of unique ids length of 7 or more! want create length of 5 unique id no collision. possible create 220.000 unique id's length of 5 , check if there collision. thanks you can try for($i = 0; $i < 10 ; $i++) { echo randstring(5),php_eol ; } output 7fh96 g93fd 97q7e 90wku 7vby9 4678f s11oe 67688 19d36 kc1bq simple collision test $hash = array(); $collision = 0; while ( count($hash) < 220000 ) { $r = randstring(5); if (isset($hash[$r])) { $collision ++; continue; } $hash[$r] = 1; } print(($collision / 220000) * 100 . "% - ($collision)"); tested 100,000 times , collision less 0.02 makes function efficient 5 character set 0.011818181818182% - (26) function used function randstring($length) { $char = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789"; $char = str_shuffle($char); for($i = 0, $rand = '', $l = strlen($char) -

usb - How to detect android physical device from eclipse? -

i'm having latest android adt bundle contains android sdk,eclipse , adt. have created app bundle, want run app eclipse real device(my android phone). i'm not able connect device eclipse. so, followed url finding device, http://developer.android.com/tools/extras/oem-usb.html now i'm not able see the usb driver path(the google usb driver located in <sdk>\extras\google\usb_driver\. ) how can solve this? turn on usb debugging in phone settings

extjs4 - Extjs 4 Store - disallow to add duplicates? -

i have store not connected server. store attached grid , add records in various places in app. is possible not allow add records exists? using idproperty not working (propably because store not connected server?). got this: ext.define('gsip_plany.grid.store.parcelstore',{ extend: 'ext.data.store', model: 'gsip_plany.grid.model.parcelmodel', listeners:{ add:function(store, records, index, eopts) { (var in records) { var idx = store.findexact('name', records[i].get('name')); if ( idx != -1 && idx < index) { store.remove(records[i]); } } } } }); the above code checks if there similar record inserted earlier , if yes, removes new record. problem have remove event handlers attached store, fired in above code, causing removal of record (based on name) in other places of app. want not store records ex

c# - Listbox items and selected Item -

i have form listbox , database-class. form calls method database returns string. public listitem() { initializecomponent(); db = new database(); itemlist = new list<string>(); showallitems(); } now, showallitems-function calls db.getallitems() function returns list. private void showallitems() { itemlist = db.getallitems(); lb_itemlist.datasource = itemlist; } the list displays names of items in listbox. but, want return description of items. don't want description displayed in listbox. want displayed on label next listbox, shows description of selected item. my main problem is, don't know how return multiple data without displaying data in listbox. want name in listbox , other data displayed next listbox on label dependent on selected item listbox public list<string> getallitems() { list<string> itemlist = new list<string>(); sqliteconnection connecti

ios - Thread 0 name: Dispatch queue: com.apple.main-thread -

i have uploaded app in appstore , app got rejected due crash.so though crash app , have tested in iphone simulators ios 9.2,8.2,8.1,8.4 didnt crash in app got crash log apple store ...help me on in advance incident identifier: e84a5bef-5ea5-4957-8dfa-3a17bece6a4d crashreporter key: c614652a8cbcbf1b4c6bb92123ad0cf98e765ffc hardware model: xxx process: stampivity [1021] path: /private/var/mobile/containers/bundle/application/cad27db1-2ef6-4396-8951-107804e17f17/stampivity.app/stampivity identifier: com.stampivity version: 1.9 (1.0) code type: arm-64 (native) parent process: launchd [1] date/time: 2016-01-05 09:39:08.08 -0800 launch time: 2016-01-05 09:35:51.51 -0800 os version: ios 9.2 (13c75) report version: 105 exception type: exc_crash (sigabrt) exception codes: 0x0000000000000000, 0x0000000000000000 exception note: exc_corpse_notify triggered thread:

Date format conversion in php 5 -

this question has answer here: convert 1 date format in php 12 answers i want convert d, d.m.y y-m-d format i.e echo $from_date=date('y-m-d', strtotime(wed, 09.12.15)); but give me result 2016-01-13 https://app.absence.io/#/calendar/absence/new check link, want send date in 2016-01-01 format database first of all, ensure date string enclosed in quotations ( " or ' ). secondly, "wed, 09.12.15" not valid date format can understood strtotime() . the full list of date formats listed here .

Git always asking for username and password even with using SSH key -

Image
i have started online gitlab account host of projects. i have set account, generated ssh key , entered ssh keys section of gitlab site. whenever attempt git push, git pull or whatever still prompted username , password. have followed instructions on gitlab website make sure not forgetting steps , still prompts me. my key looks this: ssh-rsa aaaab3nzac1yc2eaaaadaqabaaabaqdnoni9ghaeskynev76xp/bec8pb/en4mxbrp6kfam9cjpadxrmtveufjnzuo+kgsrxahvmiu6mqbinmqtct9fnorx0ucw0e5aoqwc9w1jz+jareqwyw87a5tk/4aom6tz1oy0r/uggifqaxkk1ywoxrrpcc+lan/rawfflveyyfzgof8jcj+vhuk2tpewcz6dph3xl1op+aau35vcs/fcacph/mksrqmgx4blsvzjnlkuokoywyqp2wvsldykh4vue9isszzwtgqoofqeqd/vdugourxw9eorn7bfmhf4dy5ahtpigwobo7qw6zjczief6wgdrcc1l1jzoxegvgifl james.alex.holman@gmail.com is there other things may causing this? i using linux , terminal generate these commands thanks you using http/https remote url. change ssh , not ask username password again. check remote url, might using https git remote -v

javascript - casperjs testing an internal site -

i trying run casper test internal site. running on pre-production environment, code far var casper = require('casper').create({ verbose: true, loglevel:"debug" }); // listening custom event casper.on('page.loaded', function() { this.echo('the page title ' + this.gettitle()); this.echo('value is: '+ this.getelementattribute ('input[id="edit-capture-amount"]', 'value')); }); casper.start('https://preprod.uk.systemtest.com', function() { this.echo(this.gettitle()); this.capture('frontpage.png'); // emitting custom event this.emit('age.loaded.loaded'); }); casper.run(); as can see not problem address not reachable. capture shows blank page. not sure doing wrong. hav

c# - Wpf editable ComboBox: How do I enter new text to combobox which is not in list by pressing Enter -

the problem: cannot enter custom text combobox , press enter close dropdown list, because written custom-text overwritten selected item dropdown list. i use editable=true , istextsearchenabled=true combobox list of strings: <combobox iseditable="true" istextsearchenabled="true" itemssource="{binding names}" selecteditem="{binding selectedname}" text="{binding name}" > <combobox.style> <style> <eventsetter event="textboxbase.textchanged" handler="cmbtextfield_textchanged" /> </style> </combobox.style> </combobox> textchanged: opens combobox dropdown list if text changed private void cmbtextfield_textchanged(object sender, textchangedeventargs e) { var cmbx = sender combobox; //open dropdwon cmbx.isdropdownopen = true; } how-to problem: enter first letter e.g.: "a&qu

mongodb - How can a MQTT/HTTP Client function block in Structured Text(IEC 61131-3) be created? -

i insert documents mongodb(where server present) using structured text programming collects data plc. since there no driver available, how can create http client function block , connect database? also, can connect mongodb using st there rest api available? you have note maker , model of plc vendors have own interpretation of iec spec, , have in documentation. have included function blocks handle sockets , like, , not. believe have hard time getting work, , suggest comment above does, create application on server fetches data plc instead of trying send plc. st pretty limited compared high level languages, , chances able find library fits plc.

c# - NuGet lib folder content not included in package -

Image
situation: class library called ims.general.labelwriter.csproj project labelwriter references third party assemblies (*.dll) third party assemblies inside lib folder in project root: the .dlls have build action set none in properties panel nuspec file looks this: <?xml version="1.0"?> <package > <metadata> <id>$id$</id> <version>$version$</version> <title>$title$</title> <authors>$author$</authors> <owners>$author$</owners> <requirelicenseacceptance>false</requirelicenseacceptance> <description>$description$</description> <copyright>copyright 2015</copyright> </metadata> </package> we execute command: nuget pack ims.general.labelwriter.csproj -build -symbols -includereferencedprojects -prop configuration=release nuget docs specifies references tag in nuspec file: v1.5 names of asse

javascript - Implementing XorShift the same in Java and Python -

i implement xorshift prng in both java, python , javascript. different implementations must generate exact same sequences given same seed. far, i've have not been able this. my implementation in java have following implementation of xorshift prng in java (where x long field): public long randomlong() { x ^= (x << 21); x ^= (x >>> 35); x ^= (x << 4); return x; } if seed x 1, first 4 calls randomlong() generate: 35651601 1130297953386881 -9204155794254196429 144132848981442561 my implementation in python i have tried both , without numpy. below version uses numpy. def randomlong(self): self.x ^= np.left_shift(self.x, 21) self.x ^= np.right_shift(self.x, 35) self.x ^= np.left_shift(self.x, 4) return self.x with same seed, python function generate: 35651601 1130297953386881 -9204155787274874573 # different 143006948545953793 # different my javascript implementation i've not attempted 1 yet, since

vba - Match fields in two different Excel Sheets -

so have 1 excel file multiple sheets in it, how can match fields sheet1 column , sheet2 column b if names match add name sheet3? basically have students in sheet1 , sheet2 different criteria, want find duplicates sheet1 , sheet2 , throw duplicates on sheet3. also similar question: how can find name in column b , change value else in column c. example: column b column c sam ziva jen tiva leo miva so if name sam exists in column b want name ziva in column c tried simple if statement looks 1 field. something work. or can replace inner loop vlookup per comment. dim idx1 integer dim idx2 integer dim idx3 integer idx1 = 2 idx3 = 1 while sheets("sheet1").range("a" + cstr(idx1)).value <> "" idx2 = 2 while sheets("sheet2").range("b" + cstr(idx2)).value <> "" if sheets("sheet1").range("a" + cstr(idx1)).value = sheets("sheet2&quo

java - Read relative path (outside class path) using main and test classes -

i have project structure data_folder/ myproject module1 main/java test/java pom.xml module2 ... pom.xml i access data_folder using both test , main classes. in test classes, it's possible using new file("data_folder/myfile.txt") but in main classes, it's possible using new file("../data_folder/myfile.txt") these files have outside class path because they're editable. there better way this? the common way pass in full location of data_folder parameter when start programs/tests: -dfiles_location=/somelocation/data_folder then access , create files this: string root_dir = system.getproperty("files_location"); file myfile = new file(rootdir+file.separator+"myfile.txt") then doesn't matter if it's relative path or not - point input/data files are.

python - if x == '' wont register when reading from file -

trying program split lines 3 rows file , apply "if row1 == x:" add existing class. thats not problem, ive gotten work, except when row1 ''. tried changing input file ' ', '*', , 'k' (and on), nothing worked. thing lines in input file reads: 1234565,'streetadress1','streetadress2' lines there no streetadress1 ''. program has no problem identifying number or 'streetadress2'. class adress(object): def __init__(self,street,ykord,xkord): self.street = street self.ykord = ykord self.xkord = xkord self.connected = [] self.anlid = [] self.distances = [] self.parent = [] self.child =[] def set_connections(self): input_file = open("kopplingar2.txt") temp = input_file.read().splitlines() l in temp: row = l.split(',') identity = row[0] streeta = row[1] streetb = row[2] if streeta == self.street: diction =

visual studio 2012 - Lightswitch "Object reference not set to an instance of an object" error -

i following error when try save in lightswitch application. "object reference not set instance of object" i have published application different computer. but when publish same computer on developed, works perfectly. think missing here. the error means you're trying use not defined or not initialized @ moment. if works in dev machine not on deployed machine; it's highly possible did wrong deployment. try debug , understand difference between configurations. if can't debug on deployed computer, better write log somewhere , understand variable giving error.

Haskell binding for scala program -

could please let me know whether or not it's possible write haskell bindings scala? thanks in advance examples. frege ( https://github.com/frege/frege ) dialect of haskell targets jvm. language supported close compiled ghc, ffi interfaces jvm classes instead of native code.

jsf 2 - JSF returns blank/unparsed page with plain/raw XHTML/XML/EL source instead of rendered HTML output -

i have facelets files below. webcontent |-- index.xhtml |-- register.xhtml |-- templates | |--userform.xhtml | `--banner.xhtml : both pages using templates /templates directory. /index.xhtml opens fine in browser. generated html output. have link in /index.xhtml file /register.xhtml file. however, /register.xhtml not getting parsed , returns plain xhtml / raw xml instead of generated html output. when rightclick page in browser , view page source , still see xhtml source code instead of generated html output. looks template not getting applied. however, when open /register.xhtml /faces/register.xhtml in browser's address bar, displays correctly. how caused , how can solve it? there 3 main causes. facesservlet not invoked. xml namespace uris missing or wrong. multiple jsf implemenations have been loaded. 1. make sure url matches facesservlet mapping the url of link (the url see in browser's address bar) has match <url-patte

html - With Bootstrap, how do I show radio inputs as buttons? -

my form contains code: <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/> <label for="opt-0"><input type="radio" name="opt" id="opt-0" checked>option 0</label> <label for="opt-1"><input type="radio" name="opt" id="opt-1">option 1</label> <label for="opt-2"><input type="radio" name="opt" id="opt-2">option 2</label> instead of showing radio buttons radio buttons, i'd make them regular buttons, this: <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/> <button class="btn btn-primary">option 0</button> <button class="btn btn-default">option 1</button> <button class="btn btn-default&quo

java - Android - Programmatically Screenshot and Share to Facebook -

i have button function take screenshot , share facebook. when try in samsung jellybean os device working perfectly, when try bluestack jellybean os , cheerymobile lollipop os things not working, check logcat , see error. my code onclick of button call takescreenshot(); private void takescreenshot() { date = new date(); android.text.format.dateformat.format("yyyy-mm-dd_hh:mm:ss", now); try { // image naming , path include sd card appending name choose file string mpath = environment.getexternalstoragedirectory().tostring() + "/" + + ".jpg"; // create bitmap screen capture view v1 = getwindow().getdecorview().getrootview(); v1.setdrawingcacheenabled(true); bitmap bitmap = bitmap.createbitmap(v1.getdrawingcache()); v1.setdrawingcacheenabled(false); file imagefile = new file(mpath); fileoutputstream outputstream =

c# - Update UI control from another thread while the UI is busy for time-consuming work -

my question how update ui controls (such progressbar) thread while ui thread busy querying database (running time-consuming stored procedure) ? i checked these questions , still no solution found me. updating ui continuously while main thread busy how update gui thread in c#? run multiple ui threads cross-thread cross-form. display splash screen progress bar i know 1 option time-consuming work using backgroundworker , update progressbar using reportprogress method, have problem in option because ui thread responsible instantiate , show form after querying database this: form2 f2=new form2(); f2.show(); i recommend use backgroundworker , put construction , presentation of form2 object in backgroundworker 's runworkercompleted event handler, executes on ui thread when backgroundworker finished. don't try update ui background thread. gui classes not threadsafe.

javascript - Parse Cloud: Send a notifications to a specific user -

i'm implementing push notifications follow user. apparently, managed push notifications done , responsive well.hence, notifications sent everyone.i create push notifications , received notification 1 respective user each time when other users have followed user account. i haven't create pointer should associate user. if create, there amendments should amends on cloudcode? send push notifications specific user whenever other user has followed user. eg: test 1 followed you. parse.cloud.define("followersandfollowing", function(request,result){ var query = new parse.query(parse.user); var message = request.params.message; var pushquery = new parse.query(parse.installation); query.equalto('userlink',request.params.user); parse.push.send({ where: pushquery, data : { alert: message, badge: "increment", sound: "", } }, { success: function(result) { console.log(json.stringify(resu

mongodb - Find all Mongo documents for which the max value in an array matches a query -

given document structure such this: { values: [ { value: 10 }, { value: 20 }, { value: 30 } ] } i search documents maximum value in array matches query. eg. if search documents maximum less 25 example above not match since 30 > 25. how can this? using .aggregate() method provides access aggregation pipeline. if on version 3.2 or newer stage in pipeline $redact use $$keep , $$prune variables return or discard documents don't match criteria. in $cond expression use $max operator return maximum value in "values" array return the $map operator because $redact stage mentioned in documentation: incorporates functionality of $project , $match db.collection.aggregate([ { "$redact": { "$cond": [ { "$lt": [ { "$max": { "$map": { "input": "$values",

C# report builder pdf too wide -

work in vs2013 , using report builder c#. report works fine. exports beautifully word. when send .pdf, renders w d e. any report gurus know secret sauce on .pdf render "better". it's simple text report, 1 table, no graphics, nothing fancy... find out font used in report. (press ctrl+d in adobe reader.) then, use tool embed font. alternatively, in report builder, see if can change font.

html5 - How do I add an icon to a program? -

i'm learning html5 , wish know this: how add icon program assigned program automatically if downloads it. example: if install google chrome, program automatically have google chrome logo on without me changing myself. help? thanks! i think looking apple-touch-icon : <link rel="apple-touch-icon" sizes="128x128" href="niceicon.png"> have @ website: https://developer.apple.com/library/ios/documentation/appleapplications/reference/safariwebcontent/configuringwebapplications/configuringwebapplications.html with html tag users able add web application or webpage link home screen on ios. it's not program, it's link website, think it's asking for. and android it's better add before apple-touch-icon other tag: <link rel="icon" sizes="192x192" href="nice-highres.png"> https://developer.chrome.com/multidevice/android/installtohomescreen regards.

html - What is the 'link' attribute used for in a <div> element? -

i encountered @ work looks may populate list of links data source, i'm not sure. here's code: <div mc-support-link-collection header-title="related documents" links="support.links"> according w3schools, ( http://www.w3schools.com/tags/att_body_link.asp ), link attribute-at least when used in <body> tag-sets link colors on page. have same meaning in <div> tag or different meaning? thanks!

checkout - Magento cart items check -

how can check if cart items have custom attribute? , if item/items have custom attribute prints message if 1 of cart item/items doesn't have custom attribute, prints error message in checkout? please try below code <?php $productmodel = mage::getmodel('catalog/product'); $cart = mage::getmodel('checkout/cart')->getquote(); $error = ""; foreach ($cart->getallitems() $item) { $product = $productmodel->load($item->getproduct()->getid()); if($product->getdata('your_attribute_code')){ $message = "your message items have attribute"; $error = 0; }else{ $message = "your message items have no attributes"; $error = 1; break; } } if($error == 1){ mage::getsingleton('core/session')->adderror($message); }else{ mage::getsingleton('core/session')->addsuccess($message); } ?>

ruby - rails command failing -

i following this tutorial covers tdd using rspec, capybara etc. added following gemfile: group :test, :development gem 'turn' gem 'rspec-rails' gem 'capybara' gem 'guard-rspec' gem 'growl_notify' end ran bundle install , get: juco@jucoimac ~/desktop/rails-test $ rails s gem install minitest /library/ruby/gems/1.8/gems/turn-0.9.6/lib/turn/minitest.rb:9:in `require': no such file load -- minitest/unit (loaderror) /library/ruby/gems/1.8/gems/turn-0.9.6/lib/turn/minitest.rb:9 /library/ruby/gems/1.8/gems/turn-0.9.6/lib/turn.rb:13:in `require' /library/ruby/gems/1.8/gems/turn-0.9.6/lib/turn.rb:13 /library/ruby/gems/1.8/gems/bundler-1.2.4/lib/bundler/runtime.rb:68:in `require' /library/ruby/gems/1.8/gems/bundler-1.2.4/lib/bundler/runtime.rb:68:in `require' /library/ruby/gems/1.8/gems/bundler-1.2.4/lib/bundler/runtime.rb:66:in `each' /libra

javascript - AngularJS Directive Dynamically Change Attribute -

i have bank selector. when user change bank, mask of bank's account should dynamically change. i made directive make dynamic change. i'm inspecting dom , mask being updated, it's not working, mask remains first one. html: <fieldset> <select ng-model="bankinfo.bank" ng-options="bank.name bank in banks"></select> <input bank-mask="bankinfo" type="text" ng-model="bankinfo.account"> </fieldset> bankmask directive: return { restrict: 'a', require: 'ngmodel', scope: { bankinfo: '=bankmask' }, link: function(scope, element, attrs, ngmodel) { scope.$watch('bankinfo.bank.code', function(newbankcode, oldbankcode) { if (oldbankcode !== newbankcode) { element.attr('mask', getmask(newbankcode)); $compile(element)(scope); } }); } };

Magento search for Static Block Id on frontend -

i'm newbie on magento. i'm trying find out static block id section on frontend side. don't know how find it. does have exp on this? please me. i recommend extension: https://store.zodinet.com/easy-static-block-hints.html free extension.

pdf - Create a file in SQL Server 2008 R2 and convert it to image datatype without writing it to disk? -

i working in sql server 2008 r2. i generating pdf reports building pdf plaintext (based on this: http://www.sqlservercentral.com/articles/miscellaneous/creatingapdffromastoredprocedure/1104/ ) it builds body in plaintext saves folder using sp_oacreate .pdf extension. faster ssrs in case; generating 5k-100k pdfs (historical transaction data our customers' customers) i have load these files image column clients can access report through software. is there way generate file , convert image without writing disk , reloading it? i cannot change software, file must presented client when click button in interface. i cannot change database. have these files saved image datatypes. cannot change other data type. files less 20k in size. i cannot implement filestream due pci compliance security reasons. for sql server can program stored procedure on .net language (c#, vb...) inside .net assembly write code generating pdf reports. have execute stored procedure

winforms - Move selected row from DataGridView to another in Visual C# -

i created form 2 datagridviews. 1 of these datagridviews filled data database , source. second datagridview should filled selected rows source datagridview after use button. the first step if fill datatable filled : public datatable loadmatimptable(string query) { myconn.open(); sqlitecommand cmd = new sqlitecommand(query, myconn); sqlitedataadapter sda = new sqlitedataadapter(); sda.selectcommand = cmd; datatable dt= new datatable(); sda.fill(dt); return dt; } after fill source datagridview: datatable dt = lt.loadmatimptable(querymat); this.matexpdatagridvw.rows.clear(); foreach (datarow item in dt.rows) { int n = matexpdatagridvw.rows.add(); matexpdatagridvw.rows[n].cells[0].value = false; matexpdatagridvw.rows[n].cells[1].value = item["materialid"].tostring(); matexpdatagridvw.rows[n].cells[2].value = item["name"].tostring(); matexpdatagridvw.rows[n].cells[3].value = item["preis"]; matexpdatagr

python - Is it more pythonic to manipulate object I/O with @property vs override __getitem__? -

given dictionary of data (could come database entry), more correct way wrap dictionary's data in encapsulating class has control on data can set , returned as? specifically, 2 ways have in mind to: override dict inherited class' __getitem__ , __setitem__ methods within standard object inherited class, add @property decorator each data entry needs controlled. for example: class smartcontainer(dict): ## format/check items returned def __getitem__(self,key): if key == "birthday": return "happy birthday!{bdate}".format(bdate=self.get('birthday')) if key not in self.keys(): return 0 def __init__(self,basedict): super(smartcontainer,self).__init__(basedict) class smartcontainer2(object): @property def birthday(self): return "happy birthday! {bdate}".format(bdate=self._birthday) @birthday.setter def birthday(self,value): self._birthda

android studio - Excluding multiple transitive dependencies from all configurations -

i facing problem develop android project in android studio. i using multiple *.jar extension files libraries project. but, have common classes between them, is, classes same class name , same package name. *.jar extension files are: rt.jar , tools.jar. "rt.jar" file obtained openjdk6 jre binary file debian os (x86). "tools.jar" file obtained beads library file, is, obtained "beads.zip" file, , "beads.zip" file available at: http://www.beadsproject.net/ . developing new beads-based android project in android studio. way, need javasound implementation android os, because beads library needs javasound implementation. so, wanted use javart openjdk in beads-based android project in android studio, found problem of redundant *.class extension files in project libraries "rt.jar" , "tools.jar". by way, need exclude redundant *.class extension files in "app execution process, in debug mode" (the respective button call

vb.net - CovrageInfo.CreateFromFile is giving an error -

i have replicated code example collect result code coverage here except code vb.net here code imports microsoft.visualstudio.coverage.analysis module module1 sub main() using info coverageinfo = coverageinfo.createfromfile("c:myfile\data.coverage") dim lines new list(of blocklinerange)() each [module] icoveragemodule in info.modules dim coveragebuffer byte() = [module].getcoveragebuffer(nothing) using reader isymbolreader = [module].symbols.createreader() dim methodid uinteger = 0 dim methodname string = "" dim undecoratedmethodname string = "" dim classname string = "" dim namespacename string = "" lines.clear() while reader.getnextmethod(methodid, methodname, undecoratedmethodname, classname, namespacename, lines

How can I link Boost to my CMake project on Windows -

i searched everywhere of answers relevant linux, not many use clion on windows. so extracted boost_1_60_0 c:\ , path boost root folder is c:\boost_1_60_0 i got cmakelists.txt file i'm trying set root directory of boost , include it, doesn't recognize it: set(boost_path "c:/boost_1_60_0") find_package(boost 1.60.0) if(boost_found) message(status "it works!") endif() what doing wrong?

algorithm - Why is the total number of possible substrings of a string n^2? -

i read total number of substrings can formed given string n^2 don't understand how count this. by substrings, mean, given string cat, substrings be: c ca cat @ t the total number of (nonempty) substrings n + c(n,2) . leading n counts number of substrings of length 1 , c(n,2) counts number of substrings of length > 1 , equal number of ways choose 2 indices set of n . standard formula binomial coefficients yields c(n,2) = n*(n-1)/2 . combining these 2 terms , simplifying gives total number (n^2 + n)/2 . @rici in comments notes same c(n+1,2) makes sense if e.g. think in terms of python string slicing substrings of s can written in form s[i:j] 0 <= < j <= n (with j being 1 more final index). n = 3 works out (9 + 3)/2 = 6 . in sense of complexity theory number of substrings is o(n^2) , might read somewhere.

objective c - How to set preferredTransform to exported video with AVAssetExportSession -

i trying export video same rotation transform camera does. example, film video with1920x1080 resolution(landscape) cgaffinetransform(0, -1, 1, 0, 1080, 0) . after work want export video same naturalsize , preferredtransform original video, exportsession rotating video. code below transform original video portrait mode portrait rotation, not want achieve. any idea? in advance. - (void)applydrawwithcompletion:(void(^)(nsurl *))completion { //setup video asset layer avurlasset* videoasset = (avurlasset *)self.avplayer.currentitem.asset; avmutablecomposition* mixcomposition = [avmutablecomposition composition]; avmutablecompositiontrack *compositionvideotrack = [mixcomposition addmutabletrackwithmediatype:avmediatypevideo preferredtrackid:kcmpersistenttrackid_invalid]; avassettrack *clipvideotrack = [[videoasset trackswithmediatype:avmediatypevideo] objectatindex:0]; [compositionvideotrack inserttimerange:cmtimerangemake(kcmtimezero, videoasset.duration)

vba - Open an url in a certain outlook mail -

i writing vba script open particular mail outlook , open link in mail. so far have achieved first part. how vba test part of body hyper link , open it? dim stringsearch string stringsearch = omsg.body so searchstring contains body text of mail. i know link begin phrase "searchid" , last line of mail. any help/suggestions/links appreciated. this find "searchid" within stringsearch , extract after "link". dim linkloc integer linkloc = instr(1, stringsearch, "searchid") dim link string link = mid(stringsearch, linkloc + 8)

mysql - php login system do not stop or send any error messages when users login incorrectly -

when coded php login system (in mysqli), error not checks if username or password wrong, idk abot this. please me out here. <?php // if logged in if(isset($_session['user_id'])) { header('location: index.php'); }else {} //error_reporting(0); //mysqli login form //database connection $con = mysqli_connect('localhost', 'root', '', 'console'); //actual login form if(isset($_post['login'])) { session_start(); //explainging details $username = $_post['username']; $password = $_post['password']; //fetching data $result = $con->query("select * users username='$username' , password='$password'"); $row = $result->fetch_array(mysqli_both); //logging in $_session['user_id'] = $row['user_id'];

gzip - Why Chrome prompts for downloading a page as a .gz file on hyperlinks but not I enter the URL manually? -

i discovered strange behaviour on chrome while trying accesss pages. prompt download them .gz files instead of loading them. this happens current chrome , on platforms. when page loaded can see on inspector resource interpreted document transferred mime type application/x-gzip: " https://confluence.example.com/display/engp/pr-1221 ". i know these served nginx server configured use gzip compression, there nothing wrong this. gzip on; # that's on nginx part i sure wrong nginx configuration, what? what makes problem more interesting (and annoying) if copy url hyperlink , paste browser open page correctly. yep, happens on hyperlinks. i tried find bug report on chrome on thing able find others did report similar if not same problem reddit pages or github.com ones. request url:https://confluence.example.com/display/engp/pr-1221 request method:get status code:200 ok request headersview source accept:text/html,application/xhtml+xml,application/xml;q=0

javascript - How to insert new element to 'this' child element Jquery? -

i have nested loop. first getting questions , answer xml file, , inner loop add sub questions belong head question... code: (var = 0 ; < size; i++) { var question = xml.find('row').eq(i).find('question').text(); var sizeq = xml.find('row').eq(i).find('question_down').size(); var answer = xml.find('row').eq(i).find('answer').text $('.faq_row').append(" <div class='faq_details'> <li class='faq_quest' > <a class='faq_row_question'>" + question + "<div class='faq_triangle_down'> </div></a> <div class='faq_inside_question'> <p class='faq_answer'>" + answer + "</p> <div class='faq_sub_questions'> </div> </div> </li> </div> <br>"); //here question , answer question (var j = 0; j < sizeq; j++) {

php 5.3 --> 5.6 memcacheD extension sessions compatibility issues -

when upgrade php 5.3 --> php 5.6 , use same version of memcached extension same serialization , configuration settings sessions no longer valid. even when same settings; session data doesn't persist between php versions upgrades. (i have load balanced servers , able test between them) php serialization not compatible between php 5.3 , 5.6. php breaking changes says: "unserialize() fail if passed serialized data has been manipulated attempt instantiate object without calling constructor." however, i've found serialization broken when 1 version deserializes version serializes. ran issue serialized data cached in memcached , in database records multiple versions of php attempting access same serialized data. http://php.net/manual/en/migration56.changed-functions.php a solution not use php serialization , use json or other standardized data serialization instead. we had write "translation" step read both versions of data , write new dat