Posts

swift - swift3 how do you use os_log to show the value of a variable in the Console app -

when use os_log("configure %@", something) see in console configure <private> . i understand default behavior (at least describe here https://developer.apple.com/documentation/os/logging?language=objc if objc.) i tried os_log("configure %{public}s", something) show configure %{public}s" . using swift 3, how make variable appear in console ?

fabric: "there was an error resending the invitation" -

apparently fabric beta can have internal error cannot resend invites. 5 minutes later (just now) when went did work. during time fails , gives flash/toast/popup error in title, there's nothing else tells user can it. guess if have question be, fabric fix ux wise?

Create Azure Resource Policy to enforce user? -

i looking option enforce user use specific image, trying modify below code use hub image . below code trying modify enforce windows hub "if": { "allof": [ { "field": "type", "in": [ "microsoft.compute/virtualmachines", "microsoft.compute/virtualmachinescalesets" ] }, { "field": "microsoft.compute/licensetype", "exists": windows_server } ] }, "then": { "effect": "deny" } } } if understanding right, firstly find hub images's sku. for windows server: ps c:\program files\> get-azurermvmimagesku -location westus -publishername microsoftwindowsserver -offer windowsserver-hub|select skus skus ---- 2008-r2-sp1-hub 2012-datacenter-hub 2012-r2-datacenter-hub 2016-datacenter-hub for windows client: ps c:\program files> get-azurermvmimagesku -location "west us" -publisher ...

java - Are values returned by static method are static? -

please consider code public class utilities { public static myclass getmyclass() { myclass cls = new myclass(); return cls; } } will static method return new instance of myclass every time called? or going return reference same instance on , over? declaring method static means class method , can called on class without instance (and can't access instance members because there's no object in context use - no this ). look @ code below. expected output: [1] different [2] same if want variable have lifetime of class , return same object every time declare variable static in class: public static string getthing(){ string r=new string("abc");//created every time method invoked. return r; } private static string sr=new string("abc");//static member - 1 whole class. public static string getstaticthing(){ return sr; } public static void main (string[] args) throws java.lang.exception { ...

javascript - WinJS appendTextAsync producing scheduler errors -

im trying implement logger in uwp app (windows 10) following code in both this , this answers. i'm afraid in both cases end getting scheduler ( winjs.utilities.scheduler ) errors @ random times (couldn't establish pattern). main problem the application freezes sometimes , suspect due log implementation because final line reads transitioning job (1) from: running to: blocked when happens. i messages like transitioning job (1) from: blocked_waiting to: cooperative_yield transitioning job (1) from: cooperative_yield to: scheduled in middle of execution, varying states. initialization method this.init = function () { let logger = new winjs.promise(function (complete) { let = new date(); let logfilename = `log-${now.getdate()}-${now.getmonth() + 1}-${now.getfullyear()}.log`; localfolder .createfolderasync("logs", windows.storage.creationcollisionoption.openifexists) .then(fun...

python - Bengali font is broken on Idle and Tkinter app -

i want display bengali text in tkinter label or message widget showing box things instead of text. have tried installing different font in system , applying them on code nothing working. should display text in bengali font. system detail- ubuntu 16.04, python 3.5 from tkinter import * tkinter import ttk root = tk() msg=message(root,text='আনন্দবাজার') msg.config(font=('lohit bengali', 54)) msg.pack() root.mainloop() app screenshot output you first need determine whether tcl/tk knows , can access 'lohit bengali'. run idle , click options => configure idle , @ font list. or run import tkinter tk root = tk.tk() tkinter import font fams = font.families() print('lohit bengali' in fams) # answer question above print() fam in sorted(fams): # see tcl know print(fam) edit: add parens families call

Adding Firebase to Android Application -

i followed this tutorial . i've done quite of bit of research trying fix problem. updated google services , google repository in sdk manager. iv'e tried suggested still can't sync android project , can't build or run project since first tried sync. here screen shot of project. went until point. error the build.gradle file posted project-level file. remove last line: apply plugin: 'com.google.gms.google-services' and instead, place last line of app module build.gradle file (the 1 under app ).