Posts

Showing posts from July, 2010

java - forward slash in file path causing issues. File contents are not read. Gives "The system cannot find the path specified." error -

how handle forward slash in file path. requirement read contents of csv file. giving string filename = "mynewfile.csv" converting / \ . operating system windows. using rad ide. using file.separator didn't help. giving me the system cannot find path specified. error. tried this: inputstream = sampleclass.class.getclassloader().getresourceasstream("mynewfile.csv"); bufferedreader br = new bufferedreader(new inputstreamreader(is)); and this: the moment try escape / \/ ide shows me compilation error invalid escape sequence (valid ones \b \t \n \f \r \" \' \\ ) tried moving file directly under project(moved out src folder) , changed code br = new bufferedreader(new filereader(csvfile)); still seeing the system cannot find file specified. error can please ??? sampleclass.class .getclassloader().getresourceasstream( "com/xyz/abc/" + mynewfile.csv); ...

c# - How to properly merge lambda-expressions with different parameters -

i have 2 expressions : expression<func<long, bool>> condition = x => x < max; // exp # 1 if (count > 0) { expression<func<int, bool>> limit = x => x > -1; // exp # 2 condition = expression.lambda<func<long, bool>>( expression.andalso(condition, limit), condition.parameters); } var comparator = condition.compile(); while (comparator(k++, n--)) { // } the following code compiles takes 1 parameter of type "long" combined lambda, how can pass 2 different parameters combined lambda? expression<func<long, bool>> condition = x => x < max; // exp # 1 expression<func<long, int, bool>> combined = null; if (count > 0) { expression<func<int, bool>> limit = x => x > -1; // exp # 2 combined = expression.lambda<func<long, int, bool>>( expression.and(condition.body, limit.body), new parameterexpression[] ...

java - Array List .get() not working correctly -

i'm implementing greedy algorithm solve knapsack problem, , keep running issue can't figure out. public void greedysort() { int curw = 0; collections.sort(sorted); for(int = 0; < sorted.size(); i++) { entry temp = sorted.get(i); system.out.println("index: " + temp.index + "ratio: " + temp.ratio); } system.out.println("sorted size: "+sorted.size()); while(sorted.size() > 0 && curw < maxw) { entry temp = sorted.get(0); if(curw + temp.weight <= maxw) { ret.add(temp); curw += temp.weight; } sorted.remove(0); } } when run the entry temp = sorted.get(0); i indexoutofboundsexception, though loop after collections.sort(sorted) iterate through "sorted" correctly , print out values in right order. doing wrong? also, if see errors algorithm design within code, let me know those. edit: added sorted.size println. prints 20, should. sorted array...

beautifulsoup - Beautiful Soup Scrape not showing properly -

i'm doing simple, , results not showing properly. website bed bath & beyond . i'm trying product totals per category. my script looks this. r = requests.get("http://www.bedbathandbeyond.com/store/category/bed-bath/bedding-accessories/10505/") soup = beautifulsoup(r.content) li = soup.find_all("li", {"class" : "listcount nopadleft"}) l in li: print(l.text) and outputting nothing, though know there text in elements. need inside 1 element, found when wasn't working find_all instead try , figure out going on. this html of scraping: <li class="listcount nopadleft"> <strong>showing&nbsp; 1 - 48 </strong> <span>of&nbsp;124&nbsp;product(s) </span> </li> any ideas why happening? try code (python 3): import urllib.request rq import bs4 url=rq.urlopen('http://www.bedbathandbeyond.com/store/category/bed-bath/bedding-accessories/10505/...

html - centering a border within a class -

this laughable question reason can't seem align these guys totally centered. reason border box seems to left , not sure why. can help... jsfiddle. http://jsfiddle.net/greggy_coding/b3k9lhfz/4/ the html , css <div class="container-bottom"> <a href="http://www.google.com" target="_blank" class="linkbutton">learn more</a> <h4><span></span>click find out more </h4> </div> body { background: #fff; } .container-bottom h4 { font-weight: 500; font-size : 16px ; text-align:center; color: #fff; margin-left : auto; margin-right : auto; } .linkbutton{ border: 2px solid #fff; padding: 10px 50px; width: 50px; border-radius: 30px; margin: auto; position: relative; } .container-bottom{ background-color: #000; width: 300px; height:20%; padding: 25px; position: relative; margin-left: auto ; margin...

ajax - Javascript: alternative to encodeURIComponent? -

i have div i'm using in wysiwyg editor, , when user done writing gets submitted using ajax post request. i've been running problem: anytime text contains "&" character cut off after it. spent way time looking @ server-side code, issue turned out on client side (the whole url encoding thing). looked how fix on javascript side, , came "encodeuricomponent". based on pages read (links below), best way url encoding (escape deprecated , encodeuri doesn't encode characters. when supposed use escape instead of encodeuri / encodeuricomponent? should use encodeuri or encodeuricomponent encoding urls? but encodeuricomponent isn't working. here's how used it: var wysiwyg = encodeuricomponent(document.getelementbyid("wysiwyg").innerhtml); the contents of div submitted (so know it's not ajax call), doesn't fix "&" characters, , haven't been able find alternatives on google or so. i've got few shots...

database - deleting certain rows with multiple tables T-SQL -

i have database multiple tables. want remove entries has column id value. there way in t-sql given there might tables might not have column id? you use dynamic sql create command delete records tables column 'id' in database: declare @idtodelete varchar(max) = '10' declare @sql nvarchar(max) = '' set @sql = ( select 'delete ' + object_name(c.object_id) + ' id = ' + @idtodelete + char(10) sys.columns c join sys.objects o on o.object_id = c.object_id join sys.schemas s on s.schema_id = o.schema_id , s.name = 'dbo' c.name = 'id' xml path('') ) print @sql exec sp_executesql @sql

javascript - Meteor/Masonry : wait until all templates are rendered -

this question similar meteor : wait until templates rendered , i'm asking again since seems unanswered in truth, i'll explain why. having following template code <template name="home"> <div> <ul> {{#each this}} {{> item}} {{/each}}is ready </ul> </div> </template> <template name="item"> <li><img src="{{amz-picture-url}}"></li> </template> i'd execute code once of "item" rendered . there're many of them , tried many methods onrendered , add iron-router's waiton home template, jquery's imagesloaded function try wait images... the accepted answer in previous question uses iron-router wait data ready, need sub templates rendered besides data being ready, need call masonry. is there realiable way of using mansory in meteor usecase or should change approach i'm using because...

android - Draw to framebuffer object, then blit to primary display (GLES 3.0) -

i attempting create framebuffer object, , blit primary display. purpose of to cache screen shot can blit display whenever want without re-rendering object. using open gles 3.0 android ndk. i created frame buffer in normal way. gluint framebuffer = null; glgenframebuffers( 1, &framebuffer ); glbindframebuffer( gl_framebuffer, framebuffer ); gluint colorrenderbuffer = null; glgenrenderbuffers( 1, &colorrenderbuffer ); glbindrenderbuffer( gl_renderbuffer, colorrenderbuffer ); glrenderbufferstorage( gl_renderbuffer, gl_rgba8, engine->width, engine->height ); glframebufferrenderbuffer( gl_framebuffer, gl_color_attachment0, gl_renderbuffer, colorrenderbuffer ); gluint depthrenderbuffer = null; glgenrenderbuffers( 1, &depthrenderbuffer ); glbindrenderbuffer( gl_renderbuffer, depthrenderbuffer ); glrenderbufferstorage( gl_renderbuffer, gl_depth_component16, engine->width, engine->height ); glframebufferrenderbuffer( gl_framebuffer, gl_depth_attachment,...

c# - Dealing with OutOfMemory Exception -

is there proper way deal out of memory exceptions while looping through large list , adding objects list? proper way go doing this? have large linq query returns around 600k items. go through each item , add object. code below. static void main(string[] args) { grabdata(); } public static void grabdata() { decimal? totalnetclaim = 0; using (var context = new vscmesnapentities()) { list<drivetimeobject> datafile = new list<drivetimeobject>(); drivetimeobject dt = new drivetimeobject(); datetime paramdate = new datetime(2015, 05, 30); list<viewdrivetimefiledump> dataquery = new list<viewdrivetimefiledump>(); dataquery = (from z in context.viewdrivetimefiledumps select z).tolist(); foreach (var item in dataquery) { decimal? amountchargedparts = dt.getamountchargedparts(item.chrcomponsts.trim(),...

widget - Includable Description on Blogger Blogspot -

on header widget, has: <b:include name='description'/> and want reference in post-body (inside blog widget), with: <b:includable id='description' var='a'><data:a.description/></b:includeable> but wont print out post description, code wrong? or cant referenced across widgets? i've tried modify header widget <b:include name='description' values='description'/> , got blank page instead right code post description <data:post.snippet/> (140 characters) or <data:blog.metadescription/> .

ios - NSMetadataQuery returns files which apparently don't exist -

i've start integrating icloud functionality application. have 2 test spreadsheets worked correctly when uploaded icloud through application (for test purposes). when drop more spreadsheets appropriate icloud application folder appears in mac's finder window, application sees files hidden , can't read. can tell me why these files being saved hidden files? how can prevent happening. app needs ability read csv files placed icloud application folder of apple devices (or windows using icloud windows software). after no apple documentation managed find forums explain these hidden files mean hasn't yet been downloaded. guess metadata files downloaded first show exist, upon request files downloaded. in code, if file hidden simple make call begin download: bool downloading = [[nsfilemanager defaultmanager] startdownloadingubiquitousitematurl:[result valueforattribute:nsmetadataitemurlkey] error:&error]; this start downloading file nsmetadataquery returne...

In Objective C, why use `self == [className self]` in a class +initialize? -

this question has answer here: static constructor equivalent in objective-c? 3 answers i've seen in example-- in class initialize, line have purpose? +(void)initialize { if (self == [toolcontroller self]) { ... } } i have read in class method, self refers class , not object. in theory, wouldn't check result in true? in mind, line resolve this: toolcontroller == toolcontroller so that's why think result in true. missing something? i think missing possibility self subclass of toolcontroller. presumably in example you're reading, whatever happening in +[toolcontroller initialize] should happen when superclass ( toolcontroller ) initializes, , not happen additionally when subclasses of toolcontroller initialize.

javascript - Serverside validation of AngularJS forms, use $setValidity in the view controller? -

or put in tl;dr code: form.email.$setvalidity('conflict', false); is sticky simple serverside validation flow. i'm trying form show feedback in event user enters email address in use customer. i'm running angularjs v1.2 , have template: <form name="form"> <input name="email" type="email" ng-model="..." required> </form> <div ng-messages="form.email.$error"> <div ng-message="conflict">email address in use.</div> </div> in controller, i'll handle submit event , trigger validation in $http.post().error handler this: $http.post('api/form/submit/path/here').error(function(resp) { if (resp.details === 'conflict') $scope.form.email.$setvalidity('conflict', false); }); the problem when user goes , changes value in input field, error message doesn't go away. sticks around until manually call $scope.form.setva...

java - Twitter No package identifier when getting value for resource number 0x00000000 -

i'm trying implement twitter login in android app. i've followed instructions ( https://dev.twitter.com/twitter-kit/android/twitter-login ) when call fabric.with(this, new twitter(authconfig)); following exception occur. 06-02 14:03:00.267 5623-5638/it.quepasa w/resourcetype﹕ no package identifier when getting value resource number 0x00000000 06-02 14:03:00.323 5623-5638/it.quepasa e/fabric﹕ not calculate hash app icon. android.content.res.resources$notfoundexception: resource id #0x0 @ android.content.res.resources.getvalue(resources.java:1033) @ android.content.res.resources.openrawresource(resources.java:958) @ android.content.res.resources.openrawresource(resources.java:940) @ io.fabric.sdk.android.services.common.commonutils.getappiconhashornull(commonutils.java:861) @ io.fabric.sdk.android.onboarding.doinbackground(onboarding.java:97) @ io.fabric.sdk.android.onboarding.doinbackground(onboarding.java:45) ...

javascript - check if a given value is a positive number or float with maximum two decimal places -

i trying implement validation check input text control should allow positive integer value or float maximum 2 decimal places. here fiddler approaches i've tried: https://jsfiddle.net/99x50s2s/49/ html enter price: <input type="text" id="price"/> (example: 10, 10.50. not include $ symbol.) <br/> <br/> <button type="button" id="check1">check method 1</button> (fails when value 1.00) <br/> <br/> <button type="button" id="check2">check method 2</button> (passes when value 45f) <br/> <br/> <button type="button" id="check3">check method 3</button> (passes when value -10) code: var price = $('#price'); $('#check1').on('click', function(){ var val = $.trim(price.val()); var num = number(val); if (string(num) === val && num >= 0) { alert('valid'); } ...

asp.net mvc - How to create a static dropdown in Razor syntax? -

after hours of looking on google , stack overflow, can not find 1 bloody example of how build totally brain dead simple dropdown list not come database. honestly, having hard time getting head around mvc. can please show me how create this: <select name="foobardropdown" id="foobardropdown"> <option value="option1" selected>this option 1</option> <option value="option2">this option 2</option> <option value="option3">this option 3</option> </select> using this: @html.dropdownlist.... i looking all-in-one-line solution... in view. having devil of time syntax. i think looking for. best though refactor list construction view model or in controller. @html.dropdownlist("foobardropdown", new list<selectlistitem> { new selectlistitem{ text="option 1", value = "1" }, new selectlistitem{ text="option 2", value...

Java Parallel arrays on finding two matching items -

so in school, learned arrays , have project on it. make parallel arrays on students name, test average score, quiz average score, homework average score, , final average score. also, have find highest , lowest scores. have highest score figured out unless 2 students score same high school, show one. here methods : public string gethighestscore(){ double highscore = 0; string students = ""; for(int = 0; < totaltests; i++){ if(quarteraverages[i] > highscore){ highscore = quarteraverages[i]; students = names[i]; } } return students; } this segment of code works. needed make greater in if statement greater or equal , add name string instead of changing 1 name. public string gethighestscore(){ double highscore = 0; string students = ""; for(int = 0; <= totaltests; i++){ if(quarteraverages[i] >= highscore){ highscore = quarteraverages[i]; students ...

python - Pandas to_csv call is prepending a comma -

i have data file, apples.csv, has headers like: "id","str1","str2","str3","num1","num2" i read dataframe pandas: apples = pd.read_csv('apples.csv',delimiter=",",sep=r"\s+") then stuff it, ignore (i have commented out, , overall issues still occurs, said stuff irrelevant here). i save out: apples.to_csv('bananas.csv',columns=["id","str1","str2","str3","num1","num2"]) now, looking @ bananas.csv, headers are: ,id,str1,str2,str3,num1,num2 no more quotes (which don't care about, doesn't impact in file), , leading comma. ensuing rows additional column in there, saves out 7 columns. if do: print(len(apples.columns)) immediately prior saving, shows 6 columns... i in java/perl/r, , less experienced python , particularly pandas, not sure if "yeah, that" or issue - have spent amusingly long trying...

javascript - How can i make my HTML canvas dots move more naturally? -

Image
link code pen here i opinions on how make canvas dots move in more fluid, liquid way. i've tried limiting direction number of renders (draw()), has improved little! still lacks fluidity, coming across rigid , 'hard-coded'. this switch statement way direction set, either passed random integer or previous direction. switch (direction) { case 1: star.x--; break; case 2: star.x++; break; case 3: star.y--; break; case 4: star.y++; break; case 5: star.y--; star.x--; break; case 6: star.y--; star.x++; break; case 7: ...

r - regex to exclude 2 consecutive variations -

i trying fuzzy matching (in r) , want make rules how many consecutive variations allowed. example, if use levenshtein distance , distance greater 2, want exclude matches these 2 variations happen next each other. an example: if trying match against string "james madison", -"jame madisan" produce match distance=2 -"jans madison" have distance=2 not produce hit because of 2 consecutive variations ("n" needs changed "m" , "e" must inserted before "s" in "james")

c# - Linq to Xml : highlighting respective child nodes upon selecting parent node -

i'm working on linq xml query if select branch(parent node), child nodes specific branch should highlight. developing asp.net tool, in need read xml file, reads parent node first, based on user selection, read child nodes, problem if select parent node, reading child nodes parent node, need query in should read respective child node upon selecting branch <branch name="tigerdrop"> <milestones> <milestone name="beta1"></milestone> <milestone name="beta2"></milestone> </milestones> </branch> <branch name="eagledrop"> <milestones> <milestone name="rfld"></milestone> <milestone name="rfvd"></milestone> </milestones> </branch> <branch name="liondrop"> <milestones> <milestone name="wip2"></milestone> <milestone name="wip3">...

ios - Background task execution is not working as expected -

i have requirement make web-service call on tapping actionable buttons remote notification. on remote notification, have 2 buttons "details" , "fetch". "fetch" background action (activation mode = uiusernotificationactivationmodebackground) , send data out launching app. on tapping "fetch", made web-service call send details got remote notification. i have used nsurlsession send data server. nsurlsessionconfiguration *sessionconfiguration = [nsurlsessionconfiguration backgroundsessionconfigurationwithidentifier:@"com.applewatch.sample"]; self.session = [nsurlsession sessionwithconfiguration:sessionconfiguration delegate:self delegatequeue:nil]; nsurlsessionuploadtask *datatask = [self.session uploadtaskwithrequest:mutableurlrequest fromdata:nil]; [datatask resume]; this works fine when app in active state not in suspended mode. meant here is, once remote notification , if act after 1 hour on notification, service reque...

Compilation Error: boost/atomic.hpp not found -

i have installed boost using following command sudo apt-get install libboost-all-dev when trying compile boost project gives me following compilation error fatal error: boost/atomic.hpp: no such file or directory i looked /usr/include/boost file not there also. can suggest solution boost atomic available since version 1.53. if not corrupted installed version must older 1.53.

sql server - SQL If record exist update, if not insert -

i have sql query so: cmd = new sqlcommand(@"update reservations set reservationsid = (select personid people name = @name) schedulepersonid = (select schedulepersonid scheduleperson (scheduleid = (select scheduleid schedule store_no = @storeno)) , librarytaskid = @task)"); what trying is, if record not exists, insert it. if record not exist insert reservationsid , schedulepersonid table. have seen examples online, not understand them. please help. cmd = new sqlcommand(@"update reservations set reservationsid = (select personid people name = @name) schedulepersonid = (select schedulepersonid scheduleperson (scheduleid = (select scheduleid schedule store_no = @storeno)) , librarytaskid = @task)"); isn't going want, biggest thing insert != update . is, must 1 or other syntax different. inser...

php - Search article for exact match keywords? Standard regex I found doesn't work -

i'm working wordpress articles, searching keywords "sex" , not "sexually". i've tried $string = "testing placing word @ end sex. more words here."; if ( preg_match("/\sex\b/i", strtolower($string) ) ) {} and $string = "testing placing word @ end sex. more words here."; if ( preg_match("~\sex\b~", strtolower($string) ) ) {} but both return false. obviously in article, word can @ beginning, end, near punctuation, etc. how can account this? you're missing character - notice \b after sex? means it's word boundary. need 1 before sex well, not \s - means whitespace. $string = "testing placing word @ end sex. more words here."; if ( preg_match("~\bsex\b~", strtolower($string) ) ) {} ^---- b here

c# - Changing Grid Image source on Button Click via Xaml.cs -

i new windows store application development. stuck @ trying change image of grid via c# code. this mainpage.xaml code <grid x:name="bg" keydown="operation" width="1327" height="740"> <grid.background> <imagebrush stretch="uniformtofill" imagesource="assets/background.jpg"/> </grid.background> <button x:name="themebutton" borderbrush="{x:null}" fontsize="14" content="theme 1" margin="25,0,0,0" horizontalalignment="left" click="changebg"></button> this mainpage.xaml.cs code private void changebg(object sender, routedeventargs e) { imagebrush b1 = new imagebrush(); b1.imagesource = new bitmapimage(new uri(@"d:\visual studio project file\sadiqali calculator\sadiqali calculator\assets\theme2.png")); bg.back...

java - Component for filtering a list -

Image
what java swing component suitable creating filterable list seen below? this type of filtering done using single column jtable . table has inbuilt functionality add rowsorter which: ..provides basis sorting and filtering. see how use tables: sorting , filtering . here example filtering font family names: on left more 'list looking' component, while right hand side shows component table. code import java.awt.*; import javax.swing.*; import javax.swing.border.emptyborder; import javax.swing.event.*; import javax.swing.text.document; import javax.swing.table.tablerowsorter; public class fontfilter { private jcomponent ui = null; jtextfield filtertext; tablerowsorter sorter; fontfilter(boolean listlike) { initui(listlike); } public void initui(boolean listlike) { if (ui != null) { return; } ui = new jpanel(new borderlayout(4, 4)); ui.setborder(new emptyborder(4, 4, 4,...

javascript - Output full error object in node.js -

there several places error objects used, when catch errors or in case of exec error object can passed child process. when attempt log information, not quite of makes out. i've tried following: console.log(error); console.log(error.stack); console.log(util.inpect(error, true, null)); all these options seem output different set of incomplete data. there 1 line way make sure data need see errors displayed or need use 3 of these lines (are there more statements need add?)? you can convert many javascript objects strings using json: console.log(json.stringify(error, ["message", "arguments", "type", "name"])); edit: updated reflect point made @laggingreflex in comment...

c# - How to get the number of frames per second recorded during skeletal tracking -

anyone know how number of frames per second recorded during skeletal tracking kinect v2 using c# in visual studio 2013? you can use performancecounter (from system.diagnostics) tracks "system time" have program report once per second, have integer increments @ each frame, gets reset after value reported. should give accurate framerate counter.

c# - Way to create a tree from two lists with a matching ID -

let`s have following 2 models : public class order { public guid id { get; set; } public string name { get; set; } public string location { get; set; } public string street { get; set; } public ilist<appointment> appointments { get; set; } } public class appointment { public guid id {get; set;} public datetime startdate {get; set;} public datetime enddate {get; set;} public guid orderid { get; set; } } i have list order items (all list of appointments empty) , list appointments , don`t know how match elements 2 lists in order obtain order object corresponding appointments (based on orderid). how can in efficient manner ? don`t want iterate through orders, , assign corresponding appointments.. one way "group join" 2 lists , project new collection: var neworders = o in orders join in appointments on o.id equals a.orderid g select new order { id = o.id, name = o.name, ...

Android OOM when creating bitmap from view -

i creating bitmap of layout. working fine in of devices in few samsung devices, throwing oom. below code using convert layout bitmap private void enableviewcache() { viewtoconvert.setdrawingcacheenabled(true); viewtoconvert.measure(measurespec.makemeasurespec(0, measurespec.at_most), measurespec.makemeasurespec(0, measurespec.at_most)); viewtoconvert.builddrawingcache(true); } public bitmap getbitmapfromview() { bitmap b = bitmap.createbitmap(viewtoconvert.getdrawingcache()); viewtoconvert.setdrawingcacheenabled(false); viewtoconvert.destroydrawingcache(); bytearrayoutputstream bytes = new bytearrayoutputstream(); b.compress(bitmap.compressformat.jpeg, 100, bytes); return b; } i getting oom @ bitmap.createbitmap call. have checked of oom bitmap issues in stackoverflow mentioned using sampling , dont know how implement in usecase. i'm not sure you're trying accomplish, in cases don't want extract bitmap view...

java - What is the reasoning on modelling a class to represent JSON data and do I need to? -

i have come across question on stackoverflow asks converting json java. answer shows class modelled represent json data object being created , don't understand why. does object contain information after gson reads content or 1 key/value pair? if contains 1 key/value pair, i'm assuming need create multiple objects json have below can use loop iterate on , add values drop down menu? { "1": "annie", "2": "olaf", "3": "galio", "4": "twistedfate", "5": "xinzhao", "6": "urgot", "7": "leblanc", "8": "vladimir", "9": "fiddlesticks", "10": "kayle", "11": "masteryi", "12": "alistar", "13": "ryze", "14": "sion", "15": "sivir",...

php - How to retrieve a value from the database function in joomla module? -

how retrieve value database function in joomla module ? here code: $indirect = "select getancestry('".$userid."');"; $db->setquery($indirect); $getval = $db->query(); echo "getval" . $getval ."<br>";//process breaks here

c# - Use RegEx or Macro etc. to process / generate text..Macro...Script etc -

i trying improve / automate repetitive programming task. i have bunch of files (hundreds) field declarations this: (this 1 has 66 declarations alone) string _id = string.empty; string _itemid = string.empty; string _upc = string.empty; int? _unitid; ...etc... i have generate code each line this: (first line of course) /// <summary> /// allows modification default value /// </summary> /// <param name="id">blah blah</param> /// <returns>builder object allow fluent method chaining</returns> public itembuilder withid( string id ) { this._id = id; return this; } everything boiler plate , there 2 values parsed variables regex macro. the type declaration such string, int? bool, datetime etc. 1 can plopped boilerplate code is. next var name read such _id, _itemid, _upc etc. difference though manipulations need done. _id becomes id , prefixed produce withid. _id becomes id , plopped 2 spots. _id plopped 1 spot. each l...

Twitter tmhOAuth - problems uploading image to user page -

i using tmhoauth https://github.com/themattharris/tmhoauth , , trying upload image website user's twitter page. response on callback.php 200 (success), there nothing on user's page. app has r/w permissions, , "allow application used sign in twitter" checked. has idea? using 2 php files: twitter.php include("tmhoauth.php"); include("tmhutilities.php"); $tmhoauth = new tmhoauth(array( 'consumer_key' => 'abcd123', 'consumer_secret' => 'xyz', 'curl_ssl_verifypeer' => false )); $tmhoauth->request('post', $tmhoauth->url('oauth/request_token', '')); $response = $tmhoauth->extract_params($tmhoauth->response["response"]); $temp_token = $response['oauth_token']; $temp_secret = $response['oauth_token_secret']; $time = $_server['request_time']; setcookie("temp_token", $temp_token, $time + 3600 * 30, '/'); setcookie(...

accounts-password from meteor breaking because of bcrypt -

i getting error: error: can't find npm module 'bcrypt'. did forget call 'npm.depends' in package.js within 'npm-bcrypt' package? i'm not sure make of it.. learning meteor have userd accounts-password , accounts-ui before without problems. asking dependencies. if comment out accounts-password page in ".meteor/packages" server boot without problems. has had problem before? full error. w20150602-09:54:54.633(-7)? (stderr) w20150602-09:54:54.635(-7)? (stderr) /users/vcarlos/.meteor/packages/meteor-tool/.1.1.3.1wysac9++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245 w20150602-09:54:54.635(-7)? (stderr) throw(ex); w20150602-09:54:54.635(-7)? (stderr) ^ w20150602-09:54:54.639(-7)? (stderr) error: can't find npm module 'bcrypt'. did forget call 'npm.depends' in package.js within 'npm-bcr...

sql - Issue querying date from oracle. -

i understand querying date fail comparing string date , can cause issue. oracle 11.2 g unicode db nls_date_format dd-mon-rr select * table q_date='16-mar-09'; it can solved select * table trunc(q_date) = to_date('16-mar-09', 'dd-mon-yy'); what don't why works. select* table q_date='07-jan-08'; if can please elaborate or correct mindset. thanks oracle does allow date literals, depend on installation (particularly value of nls_date_format explained here ). hence, there not universal format interpreting single string date (unless use date keyword). the default format dd-mm-yy, seems format server. so, statement: where q_date = '07-jan-08' is interpreted using format. i prefer use date keyword iso standard yyyy-mm-dd format: where q_date = date '2008-01-07'

currency - How do I show an aggregated "amount" with $ symbol on Kibana dashboard? -

kibana index show amount field "number", how show $ value after "sum" on visualization? how tell "currency" field? wait kibana 4.1 address issue: https://github.com/elastic/kibana/issues/1543

vba - how to change some pats in msgbox -

i wonder possible change parts in msgbox in following code in order receive font color , bold , font name , strikethrough etc . possible ? sub test() msgbox " msgbox" end sub this not possible in msgbox. if want display text formatted, can create userform.

html - improve input form with horizontal labels and vertical labels -

could have @ html/css-code , result behind this link ? the css part: div2 {display: table-cell; vertical-align: middle; border: 0px solid red; } input {margin: 5px; } label1 {margin-left: 140px; } label2 {margin-left: 100px; } label3 {margin-left: 90px; } label {margin-left: 10px; margin-right: 20px; } the html part: <div1> <label1>first name</label1> <label2>last name</label2> <label3>date of birth</label3> </div1> <div2> <label for='name'>person 1:</label> <input type='text' id='name' /> <input type='text' id='name' /> <input type='text' id='name' /> <br> <label for='name'>person 2:</label> <input type='text' id='name' /> <input type='text' id='name' /> <input type='text' id='name' /> <br> ...

asp.net - Submit form that posts to another site -

i have online banking login i'm trying take old client site , put on new site. if copy form , paste new site, reloads page when submitted. i've tried change asp.net form using appropriate , other applicable tags same result. if take form , put in simple index.html file, submits , takes me correct external site. i unable set id & values asp.net form , may 1 of issues. any appreciated. here html form version works in .html page needs work in .aspx page: <form action="some external site" method="post" autocomplete="off" target="_top"> <input type="hidden" name="sssid" value="my value"> <input type="hidden" name="iid" value="another value"> <div class="field-container"> <label for="aid" id="aid-label">access id</label> <input name="aid" id="aid" ty...