Posts

Showing posts from May, 2010

ios - Support size classes for many device and orientations? -

i'am doing app needs support iphone 4s, 5, 6, 6+ in portrait , landscape mode. @ moment use w - h compact size classes in portrait doesn't ok. knows option cover both orientations iphone devices thanks in general should make of design in wany/hany. devices , orientations. if want make design special device @ special orientation use specific size class special design.

ghci - new line in vim doesn't display? -

Image
i invoke ghci in gvim using :!ghci % load haskell file, however, newline displayed ^j image below shows: if invoke ghci in vim instead of gvim , ok, how newline in gvim ? for graphical version of vim, gvim, crude built-in terminal emulation used shell commands (cp. :help gui-shell ). page mentions, has limitations, , not meant used interactive commands. switching vim in terminal run shell command inside terminal (with full capabilities); guess best alternative if cannot live discrepancies, , don't want launch separate terminal gvim (i.e. :! xterm -e ghci % )

android - Start Service from BroadcastReceiver never call service.onStartCommand() method -

i have music service playing audio files. start service activity. send notification play/pause button when click on play button notification send broadcast receiver , it's working. in on onreceive(context context, intent intent) method call context.startservice(intentservice) problem musicservice.onstartcommand() never called. my receiver public class playepisodereceiver extends broadcastreceiver { @override public void onreceive(context context, intent intent) { toast.maketext(context, "service started", toast.length_short).show(); if(musicservice.isrunning()) { intent serviceintent = new intent(context, musicservice.class); serviceintent.putextra(appconstants.action_type, appconstants.action_play); context.startservice(intent); } } } my manifest: <service android:enabled="true" android:name=".backgroundtasks.musicservice">

dependency injection - Simple injector getting instance of UserStore -

this how i'm registering identity classes: container.registerperwebrequest<appdbcontext>(); container.registerperwebrequest<iappuserstore>(() => new appuserstore(container.getinstance<appdbcontext>())); container.registerperwebrequest<appusermanager>(); container.registerperwebrequest<appsigninmanager>(); container.registerinitializer<appusermanager>( manager => initializeusermanager(manager, app)); account controller: private readonly appsigninmanager _signinmanager; private readonly appusermanager _usermanager; public accountcontroller(appusermanager usermanager, appsigninmanager signinmanager ) { _signinmanager = signinmanager; _usermanager = usermanager; } everything good, when try type var test = new container().getinstance<iappuserstore>(); i next error: no registration type iappuserstore found but getinstance&l

groovy - Remap keys for groovysh when opened in ConEmu -

previous title: groovy shell settings/config file location on windows , example where can find/create groovysh/groovy shell settings/config file in microsoft windows 7? groovysh has issue groovy-6453 keys don't work correctly on windows version of groovy. i'd used autohotkey remap keys i've started use conemu , haven't figured out how differentiate tabs far autohotkey. i'm hoping i'll able remap keys in config file works globally user , not need autohotkey script anymore. just clarify there nothing wrong conemu specific version of groovysh i'm using. if set title of cmd window start groovysh title stick , autohotkey can check window title. in conemu commands input box enter -new_console:t:groovy"cmd.exe /c title groovy&&groovysh" t:groovy sets title tab conemu's viewpoint , cmd.exe /c title groovy sets title cmd's viewpoint. additional &&groovysh starts groovy console. autohotkey sees title 

c# - What is a NullReferenceException, and how do I fix it? -

i have code , when executes, throws nullreferenceexception , saying: object reference not set instance of object. what mean, , can fix error? what cause? bottom line you trying use null (or nothing in vb.net). means either set null , or never set @ all. like else, null gets passed around. if null in method "a", method "b" passed null to method "a". the rest of article goes more detail , shows mistakes many programmers make can lead nullreferenceexception . more specifically the runtime throwing nullreferenceexception always means same thing: trying use reference, , reference not initialized (or once initialized, no longer initialized). this means reference null , , cannot access members (such methods) through null reference. simplest case: string foo = null; foo.toupper(); this throw nullreferenceexception @ second line because can't call instance method toupper() on string reference pointing null .

java - NullPointerException w/ Sound Class -

i building game engine , inside of engine there class, called sound.java. purpose of class load sound effects engine , play them. problem inside constructor of sound.java, it's throwing exception called, nullpointerexception; however, doesn't make sense referencing correct file path of said sound file. take @ below code + stack trace , please me figure out! sound.java : public class sound { private clip clip; public sound(string filepath) { try { system.out.println(filepath); audioinputstream ais = audiosystem.getaudioinputstream(getclass().getresourceasstream(filepath)); audioformat baseformat = ais.getformat(); audioformat decodeformat = new audioformat(audioformat.encoding.pcm_signed, baseformat.getsamplerate(), 16, baseformat.getchannels(), baseformat.getchannels() * 2, baseformat.getsamplerate(), false); audioinputstream dais = audiosystem.getaudioinputstream(decodeformat, ais); clip = audiosystem.getclip();

c# - How to customize Pivot headers? -

i new windows phone 8.1 app development, want know how customize pivot header properties font, foreground colour, size, etc. can't find of these properties. so, hope me. create resource dictionary ( if don't have 1 ) add-new item-resource dictionary apply on app.xaml <application.resources> <resourcedictionary> <resourcedictionary.mergeddictionaries> <!-- styles define common aspects of platform , feel required visual studio project , item templates --> <resourcedictionary source="assets/style/customstyle.xaml"/> </resourcedictionary.mergeddictionaries> </resourcedictionary> </application.resources> add template resource dictionary <style x:key="custompivotstyle" targettype="pivot"> <setter property="margin" value="0,0,0,0"/> <setter property=&

c++ - other method to implement varargs -

i have write method, takes in parameters 1, 2, 3 ....or 32 integers. call call mthod f f(1) f(1,5) f(1,2,6,16,32) ... have export method swig, used after in langage. best manner had found, use varargs f(number,...) think swig doesn't support such functions export. the other way use surcharge f(int) f(int,int) f(int,int,int) .... , write 32 times is there better way it? (with templates of #define preprocessor macros) thx

parsing - How do you parse and process HTML/XML in PHP? -

how can 1 parse html/xml , extract information it? native xml extensions i prefer using 1 of native xml extensions since come bundled php, faster 3rd party libs , give me control need on markup. dom the dom extension allows operate on xml documents through dom api php 5. implementation of w3c's document object model core level 3, platform- , language-neutral interface allows programs , scripts dynamically access , update content, structure , style of documents. dom capable of parsing , modifying real world (broken) html , can xpath queries . based on libxml . it takes time productive dom, time worth imo. since dom language-agnostic interface, you'll find implementations in many languages, if need change programming language, chances know how use language's dom api then. a basic usage example can found in grabbing href attribute of element , general conceptual overview can found @ domdocument in php how use dom extension has been covered exte

How to call java script functions in objective C in cocos2d JS -

how call java script functions in objective c in cocos2d js. i found js objective c here . now trying js objective c calling. can 1 me. here official document. if want call more static method, may write js-binding codes,there many samples in cocos2dx-js source code.

ruby - How do I convert a hash's values into lambdas recursively? -

i have hash looks this: { :a => "700", :b => "600", :c => "500", :d => "400", :e => "300", :f => { :g => "200", :h => [ "test" ] } } my goal iterate on hash , return copy have values wrapped in lambda, similar this: https://github.com/thoughtbot/paperclip/blob/dca87ec5d8038b2d436a75ad6119c8eb67b73e70/spec/paperclip/style_spec.rb#l44 i went each_with_object({}) best can wrap first level, tried check when meet hash in cycle ( :f in case, it's key's values should lambda unless hash well) , treat it, it's becoming quite troublesome. def hash_values_to_lambda(old_hash) {}.tap |new_hash| old_hash.each |key, value| new_hash[key] = if value.is_a?(hash) hash_values_to_lambda(value) else lambda { value } # or -> { value } new

Python - How to return the indice value of a list? -

currently have element in initialstring: if element == word: print(element.index(initialstring)) where initialstring list , word called variable. however, returning typeerror telling me cannot convert 'list' object str implicity . you'd use initialstring.index(element) (so reversed) instead; list can tell index has element stored in; element has no knowledge of list. you should use enumerate() here however, add indices loop: i, element in enumerate(initialstring): if element == word: print(i) if wanted know index of word , however, simpler still use: print(initialstring.index(word))

angularjs - ui-router with ControllerAs binding -

ui-router state: $stateprovider .state('dashboard', { url: '/dashboard', templateurl: 'app/dashboard/dashboard.html', controller: 'dashboardcontroller vm' }); in dashboardcontroller have: var vm = this; vm.title = 'dashboard'; and in dashboard.html template: {{vm.title}} why result showing "{{vm.title}}" instead of bind it's value in controller? there's controlleras setting when configure state. $stateprovider .state('dashboard', { url: '/dashboard', templateurl: 'app/dashboard/dashboard.html', controller: 'dashboardcontroller', controlleras: 'vm' }); https://github.com/angular-ui/ui-router/wiki

magento - Run HHVM and PHP simultaneously with Nginx -

i've been running magento site using hhvm , nginx. far hadn't experienced problems , got welcomed noticeable performance boost. however, i've added plugin uses php functions unsupported hhvm. news plugin needed 1 page. bad news i'm not configuring nginx right serve page php. the usual fallback trick used people using error directives not work in case because page doesn't throw error. doesn't work if hhvm enabled. instead, i've tried write many variations of location blocks particular page. none worked, , these 2 had thought trick. is there way run php specific page? failed solution 1 location ~ /page/.+\.php${ if (!-e $request_filename) { rewrite / /index.php last; } fastcgi_pass unix:/var/run/php5-fpm.sock; ##unix socket fastcgi_param https $fastcgi_https; fastcgi_param script_filename $document_root$fastcgi_script_name; include fastcgi_params; } location ~ \.(hh|php)$ { if (!-e $request_filename

javascript - How to set JSON result to 'src' of 'img' to show an image in ASP.NET MVC4? -

i’ve got absolute path of image in json format ajax @ view. looks like: var addresimg=data.result.sourcefile;//address 'd:/jqueryfileuploadmvc4/mvc4appl/app_data/1.png' however, view cannot render image attribute “src” image should like: <img src="@url.content("~/app_data /" + "1.png")" /> but src of view is: // not correct address of image should address server js: <script type="text/javascript"> $(document).ready(function () { $('#fileupload').fileupload({ datatype: 'json', url: '/home/uploadfiles', autoupload: true, done: function (e, data) { var addresimg=data.result.sourcefile;//address 'd:/jqueryfileuploadmvc4/mvc4appl/app_data/1.png'' $(".file_source").attr('src', data.result.sourcefile);//it sets absolute path , incorrect. image iddress should src="@url.content("~/app_data /&

c# - Check if a Winform CheckBox is checked through WINAPI only -

my problem goes : need check if winform checkbox different program checked or not winapi only. here how catch underlyined c# hwnd: first hwnd's of desktop enumwindows , enumchildwindows , go on each 1 , getwindowtext compares wanted text window text , if there match - return it. just make things clear - can catch underlying hwnd. if print text , class name winform checkbox wanted. now, checkbox want check has windowsform.10.button.app.0.33c0d9d5 class name. function ask if valid checkbox: bool isvalid(){ if(!handletocontrol) return false; long_ptr styles = getwindowlongptr(handletocontrol, gwl_style); bool ischeckbox = ((styles & bs_auto3state) == bs_auto3state); ischeckbox = ischeckbox || ((styles & bs_autocheckbox) == bs_autocheckbox); ischeckbox = ischeckbox || ((styles & bs_checkbox) == bs_checkbox); return ischeckbox; } now, function work (i checked on many native checkboxes , winform checkboxes) , can validate if it's val

debugging - How to debug PHP in Notepad++ with DBGp plugin -

i using chrome , mozilla. editor notepad++. try setup debugger php. have followed this link , this link i found answers. steps are downloaded `php_xdebug-2.3.2-5.6-vc11-x86_64.dll` , placed inside `php\ext`. added following lines in `php.ini` zend_extension=php_xdebug-2.3.2-5.5-vc11-x86_64.dll xdebug.remote_enable=1 xdebug.remote_handler=dbgp xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000 xdebug.remote_mode=req xdebug.idekey=default xdebug.remote_log="c:\temp\xdebug\xdebug.log" xdebug.show_exception_trace=0 xdebug.show_local_vars=9 xdebug.show_mem_delta=0 xdebug.trace_format=0 xdebug.profiler_enable = 1 xdebug.profiler_output_dir ="c:\temp\xdebug" created xdebug folder in temp . system windows 64 bit. php version 5.6.2. [restarted apache - no error] then downloaded dbgp plugin , placed dll file inside plugins directory of notepad++; [restarted npp] plugins->dbgp -> config 127.0.0.1 empty htdocspath htdocs path

ios - NSUserDefaults in App Groups Not Working -

i trying use app groups entitlement in app nsuserdefaults handling data between iphone app , watchkit extension. i went capabilities in iphone target, , turned on app groups, , made sure group.com.316apps.iprayed selected. went watchkit extension target , did same capabilities. on iphone side of app put in following code: pfuser *me2 = [pfuser currentuser]; nslog(@"username%@", me2.username); nsuserdefaults *testdefaults = [[nsuserdefaults alloc] initwithsuitename:@"group.com.316apps.iprayed"]; [testdefaults setobject:me2.username forkey:@"username"]; [testdefaults setobject:me2.password forkey:@"password"]; [testdefaults synchronize]; in watchkit interfacecontroller, have following, nslog shows 'null' nsuserdefaults *testdefaults = [[nsuserdefaults alloc] initwithsuitename:@"group.com.316apps.iprayed"]; nsstring *theiruser = [testdefaults objectforkey:@"us

javascript - Google chart stacked column chart. How to style each individual stacked item (data series) -

i've built google chart stacked column chart. able annotate each stacked item. when comes styling each column item, last stacked item effected. working code last stacked item: // create data table. var data = google.visualization.arraytodatatable([ ['genre', '', "label", { role: 'annotation', role:'style' } ], ['column1', 5, 11, 31, 'opacity: 0.2'], ['column2', 5, 12, 32, 'opacity: 0.2'], ['column3', 5, 13, 33, 'opacity: 0.2'], ['column4', 5, 14, 34, 'opacity: 0.2'], ['column5', 5, 15, 35, 'opacity: 0.2'], ['column6', 5, 26, 36, 'opacity: 0.2'] ]); i've played around code lot receive error. apply styles each of series of data in each data row(stacked columns). sets style charts, last chart. var data = google.visualization.arraytodatatable([ ['genre', 'label1', { role:

build.gradle - How can I specify gradle project properties in gradle.properties file? -

is possible specify project properties such name in gradle.properties file possible access them build.gradle using project.name ? i've tried no luck: name=some project.name=some org.gradle.project.name=some you can it. for example in root gradle.properties file can have: version_name=2.0.2 then in build.gradle file (in root folder) can have example: allprojects { version = version_name } if use in module build.gradle file can have: android { defaultconfig { versionname project.version_name } }

java - How to configure JSP app to handle JNDI transparently on Jboss and Tomcat -

i developed application running on jboss jndi, i'd run on tomcat minimal reconfiguration user given .war file. is possible, , how? jboss 7.1.3 tomcat 7.0 edit: this part of code i'm using jboss: <%@page import="java.sql.*"%> connection conn = null; context initialcontext = new initialcontext(); string datasource_context = initialcontext.lookup("java:comp/env/dbjndids").tostring(); datasource datasource = (datasource) initialcontext.lookup(datasource_context); conn = datasource.getconnection(); this jndi definition in standalone.xml: <xa-datasource jta="true" jndi-name="java:jboss/datasources/mydatasource" pool-name="mydatasource" enabled="true" use-java-context="true" use-ccm="true"> <xa-datasource-property name="url"> jdbc:sqlserver://localhost;database=mydatabase;sendstringparametersasunicode=false;username=sa;password=sa </xa-dataso

unit testing - Mobile test automation for iOS and Android -

i wonder if have mobile test automation tool can recommend? after trying several tools cannot find 1 meets every criteria. ranorex can used on both devices after facing many issues have chosen not use it. best tool have encountered robotium, although works on android , therefore not interesting. criteria: possible ci integrate. can used nunit or similar structure. can used on both ios , android. is stable. please not recommend 1 of these recording tools, since (in opinion) not test anything. have nice day thank help. automation of applications on real devices hybrid/native/mobile web can achieved using appium open-source framework. appium allows create once , use everywhere capability mobile web apps, e.g., same script running on android ios. its rich function library support enables automate complex mobile application gestures e.g., tap, pinch, precise tap, swipe etc. for more details on appium, visit: http://appium.io/

ruby on rails - Use a hash to map to element id's with jQuery -

i have form want put submitted data correct form inputs. have hash keys id selector of form input , value the value specific form input. this hash looks like: @saved_answers = {"123456"=>"tom", "2345678"=>"brady", "789456"=>"football"} i passing hash used in jquery # found in view's script var form_saved_answers = '<%= @saved_answers.to_json %>'; now when in javascript file, want find input id key , place value in input field. this stuck, i've thought making each key/value pair array , run each function... there has more direct approach... any ideas? do without ' char var form_saved_answers = <%= @saved_answers.to_json %>; can form_saved_answers['123456'] if key not number can form_saved_answers.some_key

wordpress - Show post type where category equals page title -

i'm trying list posts custom post type 'article' on several pages post category matches page title. on products page there list articles category products, reviews page there list of articles category reviews, etc. no posts returned when use category_name, , posts returned without it. <?php // articles have category matches page title (ie: on pagination page articles pagination category) $pagetitle = get_the_title(); $posttype = 'article'; $args= array( 'post_type' => $posttype, 'post_status' => 'publish', 'category_name' => $pagetitle ); $articles = new wp_query($args); if( $articles->have_posts() ) { while ($articles->have_posts()) : $articles->the_post(); ?> <p><a href="<?php the_permalink() ?>" rel="bookmark" title="permanent link <?php the_title_attribute(); ?>"><?php the_

python - Pyodbc Connection Error -

code this code have entered using python 2.6 in linux red hat 64bit import pyodbc print pyodbc.datasources() print "connecting via odbc" conn = pyodbc.connect("driver={netezzasql};server=localhost;port=5480;database=database;uid=santiago;pwd=ha123;") error this true error received when running pyodbc. don't know language or means? {'odbc': '', 'netezzasql': '/usr/local/nz_7.2.0.3/lib64/libnzodbc.so'} connecting via odbc traceback (most recent call last): file "connect.py", line 41, in <module> conn = pyodbc.connect("driver{netezzasql};server=localhost;port=5480;database=database;uid=santiago;pwd=ha123;") pyodbc.error: ('h00', '[h00] [unixodbc]sre n/rpr trbtsaeepy\xc8 (33) (sqldriverconnectw)') obdcinst.ini this obdcinst file used [odbc drivers] netezzasql = installed [netezzasql] driver = /usr/local/nz_7.2.0.3/lib64/libnzodbc.so setup = /usr/

php - How to fix sub-query in LEFT JOIN in Codeigniter? -

i tried add in join sub-query: $this->db->join('stocks stn', 'stn.stocksidmf = (select medicalfacilities.medicalfacilitiesiduser medicalfacilities medicalfacilities.medicalfacilitiesiduser = stn.stocksidmf , stn.stocksenddate >= unix_timestamp() order stn.stocksid desc limit 1)', 'left', false);' but codeigniter spoils query. wrong in query? may somehow replace query?

Java parallel db calls -

i've web application needs extremely fast. processing requires access multiple data sources. therefore decided might useful make parallel calls optimization. basically want make many different db calls in parallel. please recommend me simple , reliable way , technologies achieving goal, useful if provide few frameworks , design patterns. right using spring. you can use new java 8 completablefuture . allows use asynchronously existing synchronous method. say have list of requests in form list<dbrequest> listrequest want run in parallel. can make stream , launching requests asynchronously in following way. list<completablefuture<dbresult>> listfutureresult = listrequest.stream() .map(req -> completablefuture.supplyasync( () -> dblaunchrequest(req), executor)) .collect(collectors.tolist()); list<dbresul

css - Scalable canvas as overlay in Google Maps Javascript API -

i have image (9600x7200) using overlay on google maps enabled web page. anchor sw , nw corners latlng , image scales correctly when zoom map. want create second overlay html5 canvas element, sized 9600x7200, sits on top of image. can when draw on canvas, scaling/positioning wrong. used https://developers.google.com/maps/documentation/javascript/examples/overlay-simple template both overlays, sets overlay element 100% of parent div, anchored map. works fine <img> , not html5 canvas, not have inherent size image does. (you can set width/height in css, underlying image has real dimensions scale css dimensions). so, question is: how create drawable canvas size of 9600x7200, , anchor map positions , scales match <img> overlay beneath it? there code samples this? don't use css resize canvas, set via width , height attributes of canvas element. if draw on canvas (let's it's stretched twice it's normal size simplicity) both it's size , position

salt stack - Copy local file in Saltstack -

i in masterless salt-minion, manage file locally. how copy local file around in saltstack .sls file? e.g. like /etc/mymodule/proxy.conf: file.managed: - source: /mymodule.conf i guess want take @ file.copy instead of file.managed . state file.managed uses source key download content uri (can salt:// , http:// , etc.) - won't intelligently guess that, if there no uri scheme in source value, should use local path on minion runs at.

c# - URL Extension in MVC 4 Not working after update -

i've updated mvc 3 mvc 4 however url extension methods not binding. not seems think url has method psurl() . still in same name space.. method: public static string psurl(this urlhelper url) view: @url.psurl() does mvc4 have different way of extending? cant seem find on it. the updates must have removed name space views web.config (note: there 2 web.configs, check 1 inside views folder!) re-adding line use extensions, resolves again. <pages pagebasetype="system.web.mvc.webviewpage"> <namespaces> <add namespace="myproject.extensions" />

android - saving checkbox states from list with shared preferences -

i asked question on how save checkbox state using textfile recommended use shared preferences. had tried method before using textfiles had same issue - checkboxes in list check , uncheck seemingly randomly. my app displays list of installed apps on device, displays title of app, icon , checkbox. if check 1 of items , scroll down , again, uncheck , other items checked randomly. i'm trying checkbox states loaded shared preferences, , saved when user manually checks box. here code listview custom adapter: public class appdetailsadapter extends baseadapter { private list<appdetails> data; private context context; public appdetailsadapter(context context, list<appdetails> data) { this.context = context; this.data = data; } @override public view getview(int position, view convertview, viewgroup parent) { view view = convertview; if (view == null) { layoutinflater vi = (layoutinflater) context.getsystemservice(context.layout_inflate

How to revoke Oauth token by using Google's Javascript APIs? -

in (client-side angularjs) web application use google api's oauth let user sign-in gapi.auth.authorize({ client_id: clientid, scope: scopes, immediate: true }, handleauthresult); now want let user signout well. i found can using http request explained in: https://developers.google.com/+/web/signin/disconnect however since i'm using javascript apis sign-in, use javascript logout (i.e. revoking access token) . is possible? if yes, how? edit : precise goal not use http request via jquery more alike login, example : gapi.auth.signout (.. the google gapi library doesn't have such method. if you're jquery averse, it's not difficult replace $.ajax xmlhttprequest. make sure understand difference between "signing out" (of google account) , revoking access token. not same thing. on sessions, typical sequence is:- 1/ check session object see if holding user object

c# - How to get Notification when "switch User" happen in window7 -

i building window application in c# notify me when switch user happen. right m using "sessionswitch" event notification. private void startlisning() { microsoft.win32.systemevents.sessionswitch +=new microsoft.win32.sessionswitcheventhandler(systemevents_sessionswitch); this.eventhandlercreated = true; } private void systemevents_sessionswitch(object sender, eventargs e) { system.io.file.appendalltext(path.combine(environment.getfolderpath(environment.specialfolder.applicationdata), "testtest.txt"), "switchuser\t" + datetime.now.tostring() + environment.newline); } but in case sending notification when "unlock" happen . don't want. need when user switch user in system application should notification , log log file. should log when lock or switchuser happen. thanks in advance. private void form1_load(object sender, eventargs e) { startlisning(); } private bool eventhandlercr

python - Generate two random strings with dash in between -

i wondering how make code in python 3.4.3 can generate 2 3 character long strings. 1 digits 0 - 9, , other capital letters of alphabet. there has dash between them. examples: mus-875 kle-443 ami-989 this have from random import randint print(randint(2,9)) try picking random string of letters, random string of digits, joining them hyphen: import string, random def pick(num): j in range(num): print("".join([random.choice(string.ascii_uppercase) in range(3)])+"-"+"".join([random.choice(string.digits) in range(3)])) as such: >>> pick(5) osd-711 krh-340 mde-271 zjf-921 lux-920 >>> pick(0) >>> pick(3) sft-252 xsl-209 maf-579

Pasting multiple images from the clipboard into PowerPoint using VBA -

is there way paste 2 images clipboard powerpoint using vba? have been able paste 1 image, copied, using .shape.paste . however, cannot figure out how select previous 1 well. or alternatively, can every item in clipboard pasted @ same time? any appreciated.

javascript - PHP/Ajax/jquery/JSON - Take a part from echo text back as a variable after Ajax Post -

i'm working on simple ajax post method , here code: <script type="text/javascript"> jquery(document).ready(function($) { $(window).scroll(function() { if($(window).scrolltop() + $(window).height() == $(document).height()) { var nexturl = "<?php echo $nexturl;?>"; $('#loading').show(); $.ajax({ url: 'ajax.php', type: 'post', datatype: 'html', data: { next_url: nexturl }, }).done(function ( html ) { $('#loadedresults').html( html ); $('#loading').hide(); }); } }); }); </script> this code sending post data ajax.php: <?php function callinstagram($url) { $ch = curl_init(); curl_setopt_array($ch, array

Working with Aliased Columns in SQL Server 2012 -

Image
okay, know this question why cannot reference aliased column where , group by , or having statements. my problem have query being moved teradata database sql server 2012. in teradata, referencing aliased column in where, group by, having, , join statements valid. my question is, how can perform query, , others it, in sql server, without having resort populating temporary table select first. (this example single part of large tsql script containing 10 separate transactions, many of or more complex example provided) select max(case when field_name = 'parent brand cd' , datalength(field_val)>1 substring(field_val, 1, datalength(field_val) - 1) else null end ) parent_brand_cd, max(case when field_name = 'brand id' , datalength(field_val)>1 substring(field_val, 1, datalength(field_val) - 1) else null end ) hotel_cd, @src_s