Posts

Showing posts from April, 2014

ios - finding user current location using Google Maps API (Google Places) -

i want know user's current location using google. know how user's altitude , longitude using mapkit don't know how translate location or address (street name, city, country). did few search , found using nsurl access given link accesses google places. however, 1 available list places nearby user. how can know user's current location? note: i'm not using apple's map since country isn't included , google more supporting it. you can use reverse geocoding services. here docs: https://developers.google.com/maps/documentation/geocoding/?hl=en#reversegeocoding example request (json): http://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=false get json data on ios: not getting json response in google query of longitude , latitude in ios? for parsing json object in ios, answer usefull you: how parse specific googlemaps api webservices json repsonse

schema.org Breadcrumb Navigation is not working -

i want have breadcrumb navigation on website shown breadcrumb navigation in google search results. that's no problem, working microdata seen here: https://support.google.com/webmasters/answer/185417?hl=en and checking if works with: http://www.google.com/webmasters/tools/richsnippets so works fine right now, noticed data-vocabulary.org used in google microdata example outdated , schema.org new standard. and there comes problem, schema.org isn't working. i used this answer in google webmaster tools richsnippets , linter.structured-data.org. google richsnippets doesn't understand , linter prints: errors argumenterror: invalid byte sequence in us-ascii structured data data did not match templates on file. submit request mailing list request support additional templates. no formats detected. parser statistics rdf::microdata::reader: 8 statements matched templates: none so whole schema.org confusing , seems not work. someone ones i'm doing wrong?

datepicker - angularjs timepicker ng-change -

i using angularjs timepicker (ui.bootstrap.timepicker). fire event when timepicker changed. looked ng-change attribute, did not find one. my purpose save changes made model when time changed. right i've used ng-model set model, cannot figure out how notify controller can perform save (the model serialized localstorage). avoid use of "save" button if possible. on related note, same thing ui.bootstrap.datepicker. you use $scope.$watch listen changes timepicker (or datepicker) , call whatever needed in controller. here plunker based on bootstrap example alerts whenever time changed. should able apply similar logic datepicker well.

javascript - Google Maps API V3 - Dynamically change InfoBox backgroundColor by Dropdown list -

i trying dynamically change infobox backgroundcolor using dropdown list (i use infobox create map labels). employ google.maps.event.adddomlistener, values ​​not returns. code below, know error? code inside javascript display labels: function displaynametext(response) { if (!response) { alert('no response'); return; } if (response.iserror()) { alert('error in query: ' + response.getmessage() + ' ' + response.getdetailedmessage()); return; } if (map.getzoom() < 9) return; ftresponse = response; numrows = response.getdatatable().getnumberofrows(); numcols = response.getdatatable().getnumberofcolumns(); for(i = 0; < numrows; i++) { var name = response.getdatatable().getvalue(i, 1); var namestr = name.tostring() while (namestr.length < 5) { namestr = '0' + namestr; } var point = new google.maps.latlng( parsefloat(response.getdatatable().getvalue(i, 2)), parsefloat(response.getda

jQuery show more details on click -

i seek in resolving issue. want reveal more details inside div upon clicking link in div. however, there on 50 divs in single page. can't give ids each div , clickable link. there we can achieve this? here have tried. <script type="text/javascript"> $(document).ready (function(){ $('#clk').click(function(e){ $('.1').css({'height':'500px', 'background-color': '#ffbbbb'} ); $(this).hide (); e.preventdefault(); }); }); </script> clk id of clickable link. .1 class of div. as mentioned earlier, going have done, have use 50 ids , 50 classes here html of part <div class="1"> <ul> <li><img src="images/thumb/someimage.jpg"></li> <li><h2>title text </h2></li> <li><h3>summary</h3></li> <li><p> para goes here. <a class="clk" href="#&q

search folder and check file in -

i need this: check file exist, in predefined folder .. my example: dim fso set fso = createobject("scripting.filesystemobject") if (fso.fileexists("file1.exe")) if (fso.fileexists("secondfile.exe)) msgbox "file esxist", 0+16, "---" wscript.quit() else dim objshell set objshell = wscript.createobject( "wscript.shell" ) objshell.run("a file") wscript.sleep(1000) objshell.sendkeys "{enter}" end if else msgbox "not founded file1.exe" wscript.quit() end if if founded file1.exe,then search second file .. if founded,then send message "file exist" if not founded, run program , exit wscript. what need? files in folder, locate script provide before launch! for example, i'll give c: \ folder trololo locate file, looks , if have perform operations. how can solve search before ask folder locate file? there no way figure out: ( sorry bad english :/

CSS3 animation and background-image in Firefox -

i have bit of css3 animation in website, , works fine on safari when run site in firefox, doesn't animate. here code: .ad{ position:relative; left:740px; top:240px; width:260px; height:195px; background-image:url('ad1.png'); animation:myfirst 4s; -webkit-animation:myfirst 4s; /* safari , chrome */ -webkit-animation-delay:2s; -webkit-animation-duration:0s; -webkit-animation-fill-mode: forwards; } @keyframes myfirst { {background-image:url('ad1.png')} {background-image:url('ad2.png')} } @-webkit-keyframes myfirst /* safari , chrome */ { {background-image:url('ad1.png');} {background-image:url('ad2.png');} } } now i've noticed issue arises when site hits background-image:url(''); if change these background:color; then works, want use image. i've tried adding -moz- prefixes, doesn't work. missing? there way make firefox acknowledge background-image:url('') the abilit

multiprocessing - issue working with multi processing programming and open mp -

i sending toy program multi-process programming. program working or not can 50% more performance. if enter # pragma parallel program not work anymore. how can improve performace ? how can tell how many processes should run best performance. example, on 4-core or 8-core? : #include <stdio.h> #include <windows.h> #include <process.h> #include <time.h> #include <stdlib.h> #define x 100000 char matrix[8000*x] ; volatile long barrier = 0 ; unsigned long long start[] ={ 0 , 1000*x+1 , 2000*x+1 , 3000*x+1 , 4000*x+1 , 5000*x+1, 7000*x+1 } ; unsigned long long stop[] ={ 1000*x , 2000*x , 3000*x , 4000*x , 5000*x , 6000*x , 8000*x } ; void init( void *arg1 ) { long ; const long s0 = start[(ulong_ptr)arg1]; const long s1 = stop[(ulong_ptr)arg1]; // #pragma omp parallel <------ *** pragma not work ! *** (i= s0 ; i< s1 ; i++ ) { matrix[i] = 0 ; }

javascript - Why does [] + [] return an empty string? -

lately have been experimenting node.js , found out javascript has syntactic logic not wrap head around. example not understand , wondering whether random javascript fact or if there logic it. the plus sign either arithmetic plus or string concatenation. empty arrays converted empty strings in case of [] + [] . the array's tostring method return 1 string comma separated list of of array's elements. from the mdn reference above: javascript calls tostring method automatically when array represented text value or when array referred in string concatenation. the same idea of automatic type conversion why true + true === 2 , , type conversion basis of many tricky javascript quizzes this one .

javascript - Dynamic array in jQuery -

i've got problem this: if($.cookie('products') == undefined) { $.cookie("products", [$(this).data('name')]); } else $.cookie("products", [$.cookie('products')+$(this).data('name')]); my goal add names of products cookie, cause need use them in php after sending them through form. i'm using array, because in code need delete last object: $.cookie("products", $.cookie('products').pop()); or maybe have solution transport variables jquery in 1 file php's variables in another? okey, managed main problem using this: var products = [$.cookie('products')]; products.push($(this).data('name')); $.cookie("products", products); but there's still problem pop() method: products.pop(); $.cookie("products", products); instead of deleting last element removes whole array.

java - Is it possible to use korean characters as file name in android -

i'am writing simple app learn korean sylabs android os. possible use korean characters file name in android os? when i'am trying file assets dir exception: 07-21 19:33:39.558: w/system.err(7315): java.io.filenotfoundexception: 가.mp3 07-21 19:33:39.558: w/system.err(7315): @ android.content.res.assetmanager.openassetfd(native method) 07-21 19:33:39.558: w/system.err(7315): @ android.content.res.assetmanager.openfd(assetmanager.java:331) 07-21 19:33:39.558: w/system.err(7315): @ net.garagefarm.hangulteatcher.mainactivity$3.onclick(mainactivity.java:141) 07-21 19:33:39.558: w/system.err(7315): @ android.view.view.performclick(view.java:4222) 07-21 19:33:39.558: w/system.err(7315): @ android.view.view$performclick.run(view.java:17273) 07-21 19:33:39.558: w/system.err(7315): @ android.os.handler.handlecallback(handler.java:615) 07-21 19:33:39.558: w/system.err(7315): @ android.os.handler.dispatchmessage(handler.java:92) 07

php - Detect if the link has video extension (.avi or .mpg etc..) return false -

i need check if link normal page or video befor passed file_get_contents because if link video page wait until whole video code and don't need video code anyway this example of code //$foourl = "foofoo.com/page.html"; //$foourl = "foofoo.com/video.mpg"; //$foourl = "foofoo.com/video.avi"; if($foourl == ???){ echo "this video not normal page"; }else{ file_get_contents($foourl); } you can use regular expression: if(preg_match('/.*\.(:?mpg|avi)/', $foourl)){ echo "this video not normal page"; ... add appropriate extensions if necessary: (:?mpg|avi|mp4) etc.

Regex help (for yahoo pipes) -

i have following string: <span class="pos">$2.472,38</span> i 2472,38 (and 2472.38 ) i've been trying in regexpal, , found [\d,.]+ seems work, due way regex module of yahoo pipes work (replace ... ..., have first select string so thinking replace .+([\d,.]+).+ $1 but that's giving me result 8 (the last digit). guess not right way i'm defining capture group. clue? in advance you can find pipe here http://pipes.yahoo.com/pipes/pipe.info?_id=06780ca250e5b107b7c1ef52455996ff your first subexpression .+ being "greedy" (i.e. trying match can while still allowing whole expression succeed), it's matching until last digit. need "stop" before start of digits somehow based on knowledge of can precede digits. if know there dollar sign right before digit , no dollar/digit combinations in span element, can add \$ after .+ , in .+\$([\d,.]+).+

javascript - Trying to visualize the time domain of a sound with Web Audio API -

i have problem trying visualize time domain of sound. can play sound - works. when connect analyzer node sound source (which connected because song plays) , context.destination, getbytetimedomaindata returns value 128, means no signal. there additional connection should make? part of code, when connect analyzer looks this: var analyser = context.createanalyser(); soundsource.connect(analyser); analyser.connect(context.destination); more code (from comment below): source = context.createbuffersource(); source.buffer = audiobuffer; source.loop = false; var analyser = context.createanalyser(); source.connect(analyser); analyser.connect(context.destination); analyser.fftsize = 2048; var timedomain = new uint8array(analyser.frequencybincount); analyser.getbytetimedomaindata(timedomain);

express - append (query string) parameters to the current url -

in express, suppose i'm @ http://localhost:3000/search?q=foo&sort=asc in template, how can print link (say next pagination link) additional parameters: search.dust <a rel="next" href="{! append page=2 !}">next results</a> -- of course, could: <a rel="next" href="{currenturl}&page=2">next results</a> but not work when i'm @ http://localhost:3000/search , because of ? / & issue. thank you i made dust helper this. called {@query} , here signature: {@query string="que=ry&str=ing"/} it merges que=ry&str=ing actual req.query parameters, in previous example on http://localhost:3000/search?q=foo&sort=asc : <a rel="next" href="?{@query string="page=2"/}">next</a> will output: <a rel="next" href="?q=foo&sort=asc&page=2">next</a> -- the implementation followed (

javascript - Fill rect with pattern -

Image
i using d3.js graph. @ point have show data special part of graph example if values cross boundary show part filling pattern. more clear there in , image. i rect part cross boundary how can fill pattern? css or canvas tricks? note : image example not real 1 how this: live demo js var svg = d3.select("body").append("svg"); svg .append('defs') .append('pattern') .attr('id', 'diagonalhatch') .attr('patternunits', 'userspaceonuse') .attr('width', 4) .attr('height', 4) .append('path') .attr('d', 'm-1,1 l2,-2 m0,4 l4,-4 m3,5 l2,-2') .attr('stroke', '#000000') .attr('stroke-width', 1); svg.append("rect") .attr("x", 0) .attr("width", 100) .attr("height", 100) .style("fill", 'yellow'); svg.append("rect") .at

c++ - Handling unget and putback with file streams -

i have implemented std::basic_streambuf derived wrapper around std::basic_filebuf converts between encodings. within wrapper use single buffer both input , output. buffering technique comes this article. now, problem can't figure out this. internal buffer filled on calls underflow . according article, when switching input output, buffer should put in state of limbo. this, need unget unread data in buffer. reading docs , source codes, unget , putback not guaranteed succeed. leave me invalid tellg pointer next input operation. i'm not asking write me, asking advice how manage ungetting data std::basic_filebuf in way not fail. i think, sure way calculate bytes written file , adjust offset accordingly. it's not simple sounds though. filebuf may have associated locale , unknown @ compile time. tried getting facet , passing data through it's out member, doesn't work. read data may have non default mbstate_t value, , codecvt objects write bom. basic

python-wnck set focus to window -

i'm trying set focus window using python-wnck. docs find related library https://developer.gnome.org/libwnck/stable/wnckwindow.html using code found on question here @ so, able search windows using window title, i'm not sure how window focus. from above docs found function: wnck_window_activate(wnckwindow *window, guint32 timestamp); so in python tried using function "window.activate(0)", appears fail, icon on taskbar flashed doesn't focus. in terminal message: (windowtest.py:17485): wnck-warning: received timestamp of 0; window activation may not function so think may need put in valid timestamp not sure how this. this code im using sofar: import pygtk pygtk.require('2.0') import gtk import wnck import re import sys screen = wnck.screen_get_default() while gtk.events_pending(): gtk.main_iteration() titlepattern = re.compile('.*geany.*') windows = screen.get_windows() w in windows: if titlepattern.match(w.get_name()):

c# - I want to assert that an exception was thrown within a certain class -

i building testproject client/server setup. want verify test fails within block of execution (there no client send server's send() method throw exception). since not want have tests boot client , server , have them communicate (which have had problems doing on single machine.) if code reaches line, means program's execution flow fail within responsibilities of test. there easier way other doing substring check on thrown exception's stacktrace? feel method not expandable , require constant attention if class names change. is there way doesn't involve manually checking exception's stacktrace? if using nunit without using dataannotations [test] public void test_xxxxxxx { var yourclass = new yourclass(); assert.that(()=>yourclass.method(), .throws.exception .typeof<typeofyourexception> .with.property("message") .equalto("the message e

app store - I created an App for Iphone, but i dont want to publish for everybody -

how can publish app @ app store, few people (my clients) download. or there way install direct iphone? force them jailbreak not option. thanks. i believe looking ios developer enterprise program , costs $299 per year. allows distribute ios apps employees (or clients in case).

objective c - iOS: Add a UIViewController above existing UIViewController -

i want make somekind of popup menu. have vc, , want vc animate , shown above first vc (second vc must bit smaller screen, first vc must visible). i read apple documentation presenting vc that's not want, think. give me route move forward. must possible , think not hard do. thanks:) first of all, it's possible present vc above vc. however, base on problem, think pushing uiview better present vc. it want present vc1 above vc2, should make 1 root controller, 1 has present vc1 , present vc2 using root controller not vc1. see code below. //in view controller 1 vc1.m appdelegate *app = [uiapplication sharedapplication]; uiviewcontroller *rootvc = app.window.rootviewcontroller; [rootvc presentmodalviewcontroller:vc2 animate:no]; but, think, if want present viewcontrller's view , want view has own controller. can add controller child view controller current viewcontroller , present view on current viewcontroller. see this: // in vc1.m [self ad

desire2learn - Modify locker location using Valence API -

our institution looking @ linking cloud storage service d2l , investigating possibility of modifying path of individual user's lockers cloud storage path using valence. the apis appear allow creation/deletion/editing of files , folders within users locker, there ability edit location of locker itself? no, sorry, root location of user's locker not modifiable through valence learning framework apis.

java - HtmlUnit failing when it tries to open dead javascript links. Is there a way to tell it not to load specific URLs? -

i'm trying little scraping on this site programatically find polling info. tried python, worked great loading site , navigating around aspx forms, couldn't extract embedded maps data (since no packages (as of yet) handle javascript). i've opted dust off java skills , break out htmlunit. however, instantly hit snag. it appears though there dead links javascript files on site don't exists. when htmlunit tries load them gets 404 , self destructs. specific error jul 21, 2013 9:51:22 pm com.gargoylesoftware.htmlunit.html.htmlpage loadexternaljavascriptfile severe: error loading javascript [http://www.eci-polldaymonitoring.nic.in/psl/googlemapforaspnet.ascx/jsdebug]. com.gargoylesoftware.htmlunit.failinghttpstatuscodeexception: 404 not found http://www.eci-polldaymonitoring.nic.in/psl/googlemapforaspnet.ascx/jsdebug @ com.gargoylesoftware.htmlunit.webclient.throwfailinghttpstatuscodeexceptionifnecessary(webclient.java:544) @ com.gargoylesoftware.htmlunit.h

Getting Xcode 4.6.3 to Autocomplete with right arrow key -

is there way make xcode autocomplete when right arrow key pressed? i'm using xcode 4.6.3 by default control-slash (^/) keyboard shortcut used "select next placeholder" can redefine according comfort xcode > preferences > keybindings can tab key autocomplete step step.

c - Segmentation fault at passing array of integers to function -

i have pasted code here, @ statement *stack_ptr->s3++ = element; segmentation fault occurring. can please let me know should change eliminate error? typedef int stack_elmnt_int; typedef struct { stack_elmnt *s1; stack_elmnt_int *s3; int length; int top; } stack; int push_stack_int(stack *stack_ptr, stack_elmnt_int element) { int i=0; if (stack_full(stack_ptr)) printf("\nstack full."); else{ *stack_ptr->s3++ = element; } } void main() { int arr[128], arr_num = sizeof(arr)/sizeof(int); //after input user arr //partial code pasted here for(i=0;i<arr_num ;i++) push_stack_int(&stack_1,arr[i]); } statement (*stack_ptr->s3++ = element;) segmentation fault occuring, probably don't allocate memory s3 . *stack_ptr->s3++ = element; ^ | assigning garbage location can please let me know should change eliminate error? in main() function

java - Menu xml in MainActivity? -

i'm going crazy! have source why goes error? this menu.xml mainactivity <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" > <group android:id="@+id/group1"> <item android:id="@+id/item1" android:title="x"></item> <item android:id="@+id/item2" android:title="y"></item> <item android:id="@+id/item3" android:title="z"></item> <item android:id="@+id/item4" android:title="share"></item> </group> </menu> and java file @override public boolean oncreateoptionsmenu(menu menu) { // inflate menu; adds items action bar if present. menuinflater inflater = getmenuinflater(); inflater.inflate(r.menu.menu_main, menu); return true; } pu

Assign CLI argument to a string variable in Ada -

i having issues when attempting assign command line argument ada program string variable. here main procedure: with ada.command_line; use ada.command_line; procedure proc cli_exception : exception; filename : string (1..argument(1)'length); usage : string (1..31); begin usage := "usage: ./proc [filename]"; if argument_count /= 1 raise cli_exception; end if; arg in 1..argument_count loop case arg when 1 => filename := argument(arg); when others => null; end case; end loop; put_line("filename is: " & filename); exception when e: cli_exception => put_line(usage); end proc; the problem here in declarative part of procedure upper bound string "filename" set. if no cli arguments given, argument(1) throw exception before procedure begins because there no argument #1. the output is: raised constraint_error : a-comli

html - Trying to separate my back-end codes in my front-end(Wordpress) -

i created form send data email address , i'm trying figure out on how separate back-end front-end in wordpress. said should use get_template_part(). code inside functions.php or separate file? this should answer that: http://codex.wordpress.org/function_reference/get_template_part load template part template (other header, sidebar, footer). makes easy theme reuse sections of code , easy way child themes replace sections of parent theme. includes named template part theme or if name specified specialized part included. if theme contains no {slug}.php file no template included. for parameter, if file called "{slug}-{name}.php".

asp.net - Memory consumption differs by environment -

i have mvc4 web application that, when volume put through it, consumes ~400mb ram in environments excluding production environment. when similar volume of load put through on production server (hosted externally), memory utilisation trebles ~1.2gb , memory isn't released when application idle. iis configuration across environments same. its worth noting application, when idle, releases of memory in test environments, doesn't same in production. ram gradually increases , tops out @ 1.2-1.3gb, never drops below – if traffic routed away server. i have not been able recreate issue on other environment other third party hosting platform, before conclusively blame infrastructure , hosting company on case wondered: a) common problem , why happen b) how can see using memory c) expect same code consume different levels of system resources based on platform (i know host may have monitoring etc. in production perhaps inflate little) any on appreciated. this com

ios - How do I do that? insert image in code? -

Image
(please check link first before answer can trying say)i have check code in github in xcode found code in class working great even [[nsarray arraywithobjects: @"😄", @"😊", @"😃", @"😉", @"😍", @"😘", @"😚", @"😳", @"😌", @"😁", @"😜", @"😝", @"😒", @"😏", @"😓", @"😔", @"😞", @"😖", @"😥", @"😰", @"😨", @"😣", @"😢", @"😭", @"😂", @"😲", @"😱", @"😠", @"😡", @"😪", @"😷", @"👿", @"👽", @"💛", @"💙", @"💜", @"💗", @"💚", @"💔", @"💓", @"💘✨", @"🌟", @"💤", @"🎵", @"🔥", @"💩", @"👍", @"👎&qu

javascript - take specific items from a string and set in other look -

i have javascript pages , return in array, link want, example: in array "linkstoopen" -> game.php?page=fleet&galaxy=7&system=3&planet=4&planettype=1&target_mission=16 and have others game.php?page=fleet&galaxy=1&system=10&planet=10&planettype=1&target_mission=16 i want take array galaxy = x system = x planet = x i have window.location open items in array, want take array things mentioned before, , set here set galaxy = x above system = x above planet = x above game.php?page=fleet3&mission=16&galaxy=[here]&system=[here]&planet=[here]&planettype=1&speed=100&metal=0&crystal=0&deuterium=0&usedfleet=lgbkbagcbwvkbggmbwr3bvvlzqnjzqnjzqnjzqnjzqnjzpv7sd==&holdingtime=1 and open link new values in window.location someone can how value of every system=x, galaxy=x, planet=x? i think can alone rest :s thx edit: i through array links, set split in &, in new array use

sql - how to fetch data from oracle database using PHP -

i trying create class executing oracle sql statements on php. here index.php trying call function <?php include "dbaseconn/dbcontrol.php"; $dbcontrol = new dbcontrol; $dbcontrol->execute(" select * sample_table"); foreach($dbcontrol->data $items) { echo $items['sample_column_name']; } ?> and dbcontrol.php function <?php class dbcontrol{ public $dbstr ='(description = (address_list = (address = (community = tcp.world)(protocol = tcp)(host = xx.xxx.xxx.xx)(port = xxxx)) ) (connect_data = (sid = xxxxx) ) )'; public $user = "xxxxx"; public $password = "xxxxx"; function connect(){ $this->connection = oci_connect($this->user,$this->password,$this->dbstr) or die(oci_

backbone.js - Backbone View injected links reload Site -

after rendering backbone view inject html generated jquery. html includes links within application. if click links reload site. how can bind links trigger router , don't reload site? you have bind click event links , call router.navigate . it's important return false event handler prevent borwser follow link. important thing pass trigger: true have router execute (otherwise change url displayed in address bar). events : { 'click a.changeview' : 'changeview' }, changeview : function(e) { router.navigate(e.target.href, { trigger: true }); return false; } also, might have tweak href bit if contains protocol, domain, etc... instance if href http://mydomain.com/mypage might need pass mypage router.

windows - Mysterious MFSourceFilter -

Image
few days ago, wanted give media foundation try. the first thing i've noticed is doesn't play mpeg2 file (at least not on windows 7), however, windows media player 12 does. therefore, i've ran mftrace wmplayer.exe , examined output. 9052,2bf4 14:06:36.00364 cole32exportdetours::cocreateinstance @ created {14d7a407-396b-44b3-be85-5199a0f0f80a} media foundation dshow source resolver (c:\windows\syswow64\mfds.dll) @0984e950 - traced interfaces: 9052,1bec 14:06:36.00450 cole32exportdetours::cocreateinstance @ created {cda42200-bd88-11d0-bd4e-00a0c911ce86} filter mapper2 (c:\windows\syswow64\quartz.dll) @0821b894 - traced interfaces: 9052,2bf4 14:06:36.00723 cole32exportdetours::cocreateinstance @ created {e436ebb3-524f-11ce-9f53-0020af0ba770} filter graph (c:\windows\syswow64\quartz.dll) @081c7dd0 - traced interfaces: igraphbuilder @081c7dd0, imediacontrol @04e6d66c, 9052,2bf4 14:06:36.00741 cole32exportdetours::cocreateinstance @ created {0344ec28-5339-4124-a186-2e

javascript - Uncaught TypeError: Object #<error> has no method 'get' in Chrome -

i have link onclick function: <a id="content-tmce" class="wp-switch-editor switch-tmce" onclick="return_tinymce_status();">visual</a> when clicked, editor load tinymce again (from original codemirror environment). return_tinymce_status function: function return_tinymce_status() { if (!(window.tinymce)) { window.tinymce=tinymce; } } in firefox, when click link, working fine without errors in js console. in chrome, this: uncaught typeerror: object #<error> has no method 'get' any special handling js window in chrome? or missing simple here? points error to: var switcheditors={switchto:function(b){var c=b.id,a=c.length,e=c.substr(0,a-5),d=c.substr(a-4);this.go(e,d)},go:function(g,f){g=g||"content";f=f||"toggle";var c=this,b=tinymce.get(g),a,d,e=tinymce.dom;a="wp-"+g+"-wrap";d=e.get(g);if("toggle"==f){if(b&&!b.ishidden()){f="htm

c# - How to cut out a part of a path? -

i want cut out part of path don't know how. path , use code: string path = system.io.path.getdirectoryname(fullyqualifiedname); (path = "y:\test\project\bin\debug") now need first part without "\bin\debug" . how can cut part out of current path? if know, don't need "\bin\debug" use replace: path = path.replace("\bin\debug", ""); or path = path.remove(path.indexof("\bin\debug")); if know, don't need everything, after second \ use this: path = path.remove(path.lastindexofany(new char[] { '\\' }, path.lastindexof('\\') - 1)); and finally, take many parts, how many want this: path = string.join(@"\", path.split('\\').take(3)); or skip many parts, how many need: path = string.join(@"\", path.split('\\').reverse().skip(2).reverse());

php - How to display multiple tables based on value -

i have inventory page displays information, i'm attempting have multiple tables based on department value, want display each department in tables rather single table, seems make page easier view, yes i'm new, yes i'm using mysql, know deprecated blah blah blah, local db , i'm self-taught. have use kind of loop or there easier way? <?php $connect = mysql_connect("localhost", "me", "password") or die ("check connection."); mysql_select_db("radio"); $quey1="select * inventory order department, user"; $result=mysql_query($quey1) or die(mysql_error()); ?> <table border=1 cellpadding="10 cellspacing="1 style="background-color:#f0f8ff;" > <tr> <th>serial number</th> <th>model</th> <th>department</th> <th>user</th> <th>date</th> </tr> <?php while($row=mysql_fetch_array($result)){

Azure Virtual Machine is stuck in Running (Provisioning) mode -

we created image virtual machine running fine on azure(from last 1 year). machine has lots of configuration. executed sysprep utility , created image. followed steps mentioned in below article. http://www.windowsazure.com/en-us/manage/windows/how-to-guides/capture-an-image/ now trying create vm using image , received provisioning timeout issue 2 times. no further information received along time out issue. started 1 more time, still it’s showing in provisioning mode. vhd of actual machine still available in storage. tried create machine disk option. in case machine created , status shown running, rdp didn't worked. following information missing on machine: 1) host name 2) rdp certificate thumbprint we need assistance original machine. please suggest it’s critical production. i had same problem. it's because accidentally skipped second part of step 4 of this article in system cleanup action, select enter system out-of-box experience (oobe)

css - Global selector with box-sizing -

i read developers use box-sizing in global selector common practice whole web project. best practice or should avoided? , performance? *{ -moz-box-sizing:border-box; -webkit-box-sizing:border-box; box-sizing:border-box; } short answer: yes, fine use. here optimized code snippet: /* apply natural box layout model elements, allowing components change */ html { box-sizing: border-box; } *, *:before, *:after { box-sizing: inherit; } read here more: http://www.paulirish.com/2012/box-sizing-border-box-ftw/

android - Top margin is substracted from height in API10 and below -

Image
in project i'm working on, i'm positioning views within framelayout wrap_content : <framelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".mainactivity"> <framelayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#ff0400"> <textview android:background="#04ff00" android:text="test" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_margintop="10dp" android:layout_marginleft="10dp" android:layout_marginbottom="10dp" android:lay